home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / comm / mail / YAM23src.lha / Source / YAM_COg.c < prev    next >
C/C++ Source or Header  |  2001-06-07  |  76KB  |  1,514 lines

  1. /***************************************************************************
  2.  
  3.  YAM - Yet Another Mailer
  4.  Copyright (C) 1995-2000 by Marcel Beck <mbeck@yam.ch>
  5.  Copyright (C) 2000-2001 by YAM Open Source Team
  6.  
  7.  This program is free software; you can redistribute it and/or modify
  8.  it under the terms of the GNU General Public License as published by
  9.  the Free Software Foundation; either version 2 of the License, or
  10.  (at your option) any later version.
  11.  
  12.  This program is distributed in the hope that it will be useful,
  13.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  GNU General Public License for more details.
  16.  
  17.  You should have received a copy of the GNU General Public License
  18.  along with this program; if not, write to the Free Software
  19.  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20.  
  21.  YAM Official Support Site :  http://www.yam.ch
  22.  YAM OpenSource project    :  http://sourceforge.net/projects/yamos/
  23.  
  24.  $Id: YAM_COg.c,v 1.11.2.1 2001/06/07 13:11:22 laursen Exp $
  25.  
  26. ***************************************************************************/
  27.  
  28. #include "YAM.h"
  29.  
  30. /* local protos */
  31. LOCAL APTR MakeVarPop(APTR*, int, int, char*);
  32. LOCAL APTR MakePhraseGroup(APTR*, APTR*, APTR*, char*, char*);
  33. LOCAL Object *MakeStaticCheck(void);
  34.  
  35.  
  36. /***************************************************************************
  37.  Modul: Configuration - GUI for sections
  38. ***************************************************************************/
  39.  
  40. /*** Hooks ***/
  41. /// PO_List2TextFunc
  42. //  Copies listview selection to text gadget
  43. void SAVEDS ASM PO_List2TextFunc(REG(a2,Object *list), REG(a1,Object *text))
  44. {
  45.    char *selection;
  46.    DoMethod(list, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, &selection);
  47.    if (selection) if (strcmp(selection, GetStr(MSG_MA_Cancel))) set(text, MUIA_Text_Contents, selection);
  48. }
  49. MakeHook(PO_List2TextHook, PO_List2TextFunc);
  50.  
  51. ///
  52. /// CO_LV_TDspFunc
  53. //  Translation table listview display hook
  54. long SAVEDS ASM CO_LV_TDspFunc(REG(a0,struct Hook *hook), REG(a2,char **array), REG(a1,struct TranslationTable *entry))
  55. {
  56.    array[0] = entry->Name;
  57.    return 0;
  58. }
  59. MakeHook(CO_LV_TDspHook,CO_LV_TDspFunc);
  60.  
  61. ///
  62. /// CO_LV_TConFunc
  63. //  Translation table listview construction hook
  64. struct TranslationTable * SAVEDS ASM CO_LV_TConFunc(REG(a1,struct TranslationTable *tt))
  65. {
  66.    struct TranslationTable *entry = malloc(sizeof(struct TranslationTable));
  67.    memcpy(entry, tt, sizeof(struct TranslationTable));
  68.    return entry;
  69. }
  70. MakeHook(CO_LV_TConHook, CO_LV_TConFunc);
  71.  
  72. ///
  73. /// CO_LV_RxDspFunc
  74. //  ARexx listview display hook
  75. long SAVEDS ASM CO_LV_RxDspFunc(REG(a0,struct Hook *hook), REG(a2,char **array), REG(a1,int num))
  76. {
  77.    static char rexxoptm[SIZE_DEFAULT];
  78.    int scr = num-1;
  79.  
  80.    strcpy(array[0] = rexxoptm, "");
  81.    if (*CE->RX[scr].Script) strcat(rexxoptm, MUIX_PH);
  82.    switch (scr)
  83.    {
  84.       case MACRO_STARTUP:   strcat(rexxoptm, GetStr(MSG_CO_ScriptStartup)); break;
  85.       case MACRO_QUIT:      strcat(rexxoptm, GetStr(MSG_CO_ScriptTerminate)); break;
  86.       case MACRO_PREGET:    strcat(rexxoptm, GetStr(MSG_CO_ScriptPreGetMail)); break;
  87.       case MACRO_POSTGET:   strcat(rexxoptm, GetStr(MSG_CO_ScriptPostGetMail)); break;
  88.       case MACRO_NEWMSG:    strcat(rexxoptm, GetStr(MSG_CO_ScriptNewMsg)); break;
  89.       case MACRO_PRESEND:   strcat(rexxoptm, GetStr(MSG_CO_ScriptPreSendMail)); break;
  90.       case MACRO_POSTSEND:  strcat(rexxoptm, GetStr(MSG_CO_ScriptPostSendMail)); break;
  91.       case MACRO_READ:      strcat(rexxoptm, GetStr(MSG_CO_ScriptReadMsg)); break;
  92.       case MACRO_PREWRITE:  strcat(rexxoptm, GetStr(MSG_CO_ScriptPreWriteMsg)); break;
  93.       case MACRO_POSTWRITE: strcat(rexxoptm, GetStr(MSG_CO_ScriptPostWriteMsg)); break;
  94.       case MACRO_URL:       strcat(rexxoptm, GetStr(MSG_CO_ScriptClickURL)); break;
  95.       default: sprintf(&rexxoptm[strlen(rexxoptm)], GetStr(MSG_CO_ScriptMenu), num);
  96.    }
  97.    return 0;
  98. }
  99. MakeHook(CO_LV_RxDspHook,CO_LV_RxDspFunc);
  100.  
  101. ///
  102. /// PO_HandleXPKFunc
  103. //  Copies XPK sublibrary id from list to string gadget
  104. void SAVEDS ASM PO_HandleXPKFunc(REG(a1,APTR text), REG(a2,APTR pop))
  105. {
  106.    char *entry;
  107.    DoMethod(pop, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, &entry);
  108.    if (entry) set(text, MUIA_Text_Contents, entry);
  109. }
  110. MakeHook(PO_HandleXPKHook, PO_HandleXPKFunc);
  111.  
  112. ///
  113. /// MakeXPKPop
  114. //  Creates a popup list of available XPK sublibraries
  115. APTR MakeXPKPop(APTR *text, BOOL pack, BOOL encrypt)
  116. {
  117.    APTR lv, po;
  118.  
  119.    if (po = PopobjectObject,
  120.       MUIA_Popstring_String, *text = TextObject, TextFrame,
  121.          MUIA_Background, MUII_TextBack,
  122.          MUIA_FixWidthTxt, "MMMM",
  123.       End,
  124.       MUIA_Popstring_Button, PopButton(MUII_PopUp),
  125.       MUIA_Popobject_ObjStrHook, &PO_HandleXPKHook,
  126.       MUIA_Popobject_WindowHook, &PO_WindowHook,
  127.       MUIA_Popobject_Object, lv = ListviewObject,
  128.          MUIA_Listview_List, ListObject,
  129.             InputListFrame,
  130.             MUIA_List_ConstructHook, MUIV_List_ConstructHook_String,
  131.             MUIA_List_DestructHook, MUIV_List_DestructHook_String,
  132.          End,
  133.       End,
  134.    End)
  135.    {
  136.       struct XpkPackerList xpl;
  137.       if (XpkBase) if (!XpkQueryTags(XPK_PackersQuery, &xpl, TAG_DONE))
  138.       {
  139.          struct XpkPackerInfo xpi;
  140.          int i;
  141.          for (i = 0; i < xpl.xpl_NumPackers; i++)
  142.          {
  143.             if (!XpkQueryTags(XPK_PackMethod, xpl.xpl_Packer[i], XPK_PackerQuery, &xpi, TAG_DONE))
  144.             {
  145.                BOOL suits = TRUE;
  146.                if (encrypt && !(xpi.xpi_Flags&XPKIF_ENCRYPTION)) suits = FALSE;
  147.                if (pack && !(xpi.xpi_Flags&0x3f)) suits = FALSE;
  148.                if (suits) DoMethod(lv, MUIM_List_InsertSingle, xpl.xpl_Packer[i], MUIV_List_Insert_Sorted);
  149.             }
  150.          }
  151.       }
  152.       DoMethod(lv,MUIM_Notify,MUIA_Listview_DoubleClick,TRUE,po,2,MUIM_Popstring_Close,TRUE);
  153.    }
  154.    return po;
  155. }
  156.  
  157. ///
  158. /// PO_HandleTrans
  159. //  Copies filename of selected translation table to the string gadget
  160. void SAVEDS ASM PO_HandleTrans(REG(a1,APTR string), REG(a2,APTR pop))
  161. {
  162.    struct TranslationTable *entry;
  163.    DoMethod(pop, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, &entry);
  164.    if (entry) setstring(string, entry->File);
  165. }
  166. MakeHook(PO_HandleTransHook, PO_HandleTrans);
  167.  
  168. ///
  169. /// MakeTransPop
  170. //  Creates a popup list of available translation tables
  171. APTR MakeTransPop(APTR *string, BOOL output,  char *shortcut)
  172. {
  173.    APTR lv, po;
  174.  
  175.    if (po = PopobjectObject,
  176.       MUIA_Popstring_String, *string = MakeString(SIZE_PATHFILE, shortcut),
  177.       MUIA_Popstring_Button, PopButton(MUII_PopUp),
  178.       MUIA_Popobject_ObjStrHook, &PO_HandleTransHook,
  179.       MUIA_Popobject_WindowHook, &PO_WindowHook,
  180.       MUIA_Popobject_Object, lv = ListviewObject,
  181.          MUIA_Listview_ScrollerPos, MUIV_Listview_ScrollerPos_None,
  182.          MUIA_Listview_List, ListObject,
  183.             InputListFrame,
  184.             MUIA_List_DisplayHook, &CO_LV_TDspHook,
  185.             MUIA_List_ConstructHook, &CO_LV_TConHook,
  186.             MUIA_List_DestructHook, &GeneralDesHook,
  187.          End,
  188.       End,
  189.    End)
  190.    {
  191.       char dir[SIZE_PATH], file[SIZE_PATHFILE];
  192.       struct FileInfoBlock *fib;
  193.       BPTR lock;
  194.       strmfp(dir, G->ProgDir, "charsets");
  195.       fib = AllocDosObject(DOS_FIB,NULL);
  196.       if (lock = Lock(dir, ACCESS_READ))
  197.       {
  198.          Examine(lock, fib);
  199.          while (ExNext(lock,fib) && (IoErr() != ERROR_NO_MORE_ENTRIES))
  200.          {
  201.             struct TranslationTable *tt = NULL;
  202.             strmfp(file, dir, fib->fib_FileName);
  203.             if (LoadTranslationTable(&tt, file))
  204.             {
  205.                if ((output && *tt->DestCharset) || (!output && *tt->SourceCharset))
  206.                   DoMethod(lv, MUIM_List_InsertSingle, tt, MUIV_List_Insert_Bottom);
  207.                free(tt);
  208.             }
  209.          }
  210.          UnLock(lock);
  211.       }
  212.       FreeDosObject(DOS_FIB,fib);
  213.       DoMethod(lv,MUIM_Notify,MUIA_Listview_DoubleClick,TRUE,po,2,MUIM_Popstring_Close,TRUE);
  214.    }
  215.    return po;
  216. }
  217.  
  218. ///
  219. /// PO_HandleVar
  220. //  Pastes an entry from variable listview into string gadget
  221. void SAVEDS ASM PO_HandleVar(REG(a1,APTR string), REG(a2,APTR pop))
  222. {
  223.    char *var, buf[3];
  224.  
  225.    DoMethod(pop, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, &var);
  226.    if (var)
  227.    {
  228.       buf[0] = var[0]; buf[1] = var[1]; buf[2] = 0;
  229.       DoMethod(string, MUIM_BetterString_Insert, buf, MUIV_BetterString_Insert_BufferPos);
  230.    }
  231. }
  232. MakeHook(PO_HandleVarHook, PO_HandleVar);
  233.  
  234. ///
  235. /// MakeVarPop
  236. //  Creates a popup list containing variables and descriptions for phrases etc.
  237. LOCAL APTR MakeVarPop(APTR *string, int mode, int size, char *shortcut)
  238. {
  239.    APTR lv, po;
  240.  
  241.    if (po = PopobjectObject,
  242.       MUIA_Popstring_String, *string = MakeString(size, shortcut),
  243.       MUIA_Popstring_Button, PopButton(MUII_PopUp),
  244.       MUIA_Popobject_ObjStrHook, &PO_HandleVarHook,
  245.       MUIA_Popobject_WindowHook, &PO_WindowHook,
  246.       MUIA_Popobject_Object, lv = ListviewObject,
  247.          MUIA_Listview_ScrollerPos, MUIV_Listview_ScrollerPos_None,
  248.          MUIA_Listview_List, ListObject,
  249.             InputListFrame,
  250.             MUIA_List_AdjustHeight, TRUE,
  251.          End,
  252.       End,
  253.    End)
  254.    {
  255.       switch (mode)
  256.       {
  257.          case 0:
  258.          case 1:  DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_LineBreak), MUIV_List_Insert_Bottom);
  259.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(mode?MSG_CO_RecptName:MSG_CO_ORecptName), MUIV_List_Insert_Bottom);
  260.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(mode?MSG_CO_RecptFirstname:MSG_CO_ORecptFirstname), MUIV_List_Insert_Bottom);
  261.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(mode?MSG_CO_RecptAddress:MSG_CO_ORecptAddress), MUIV_List_Insert_Bottom);
  262.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_SenderName), MUIV_List_Insert_Bottom);
  263.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_SenderFirstname), MUIV_List_Insert_Bottom);
  264.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_SenderAddress), MUIV_List_Insert_Bottom);
  265.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_SenderSubject), MUIV_List_Insert_Bottom);
  266.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_SenderDate), MUIV_List_Insert_Bottom);
  267.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_SenderTime), MUIV_List_Insert_Bottom);
  268.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_SenderDOW), MUIV_List_Insert_Bottom);
  269.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_SenderMsgID), MUIV_List_Insert_Bottom);
  270.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_CompleteHeader), MUIV_List_Insert_Bottom);
  271.                   break;
  272.          case 2:  DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_SenderInitials), MUIV_List_Insert_Bottom);
  273.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_Sender2Initials), MUIV_List_Insert_Bottom);
  274.                   break;
  275.          case 3:  DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_ArchiveName), MUIV_List_Insert_Bottom);
  276.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_ArchiveFiles), MUIV_List_Insert_Bottom);
  277.                   DoMethod(lv, MUIM_List_InsertSingle, GetStr(MSG_CO_ArchiveFilelist), MUIV_List_Insert_Bottom);
  278.                   break;
  279.  
  280.       }
  281.       DoMethod(lv,MUIM_Notify,MUIA_Listview_DoubleClick,TRUE,po,2,MUIM_Popstring_Close,TRUE);
  282.    }
  283.    return po;
  284. }
  285.  
  286. ///
  287. /// MakePhraseGroup
  288. //  Creates a cycle/string gadgets for forward and reply phrases
  289. LOCAL APTR MakePhraseGroup(APTR *hello, APTR *intro, APTR *bye, char *label, char *help)
  290. {
  291.    APTR grp, cycl, pgrp;
  292.    static char *cytext[4];
  293.    cytext[0] = GetStr(MSG_CO_PhraseOpen);
  294.    cytext[1] = GetStr(MSG_CO_PhraseIntro);
  295.    cytext[2] = GetStr(MSG_CO_PhraseClose);
  296.    cytext[3] = NULL;
  297.    if (grp = HGroup,
  298.          MUIA_Group_HorizSpacing, 1,
  299.          Child, cycl = CycleObject,
  300.             MUIA_CycleChain, 1,
  301.             MUIA_Font, MUIV_Font_Button,
  302.             MUIA_Cycle_Entries, cytext,
  303.             MUIA_ControlChar, ShortCut(label),
  304.             MUIA_Weight, 0,
  305.          End,
  306.          Child, pgrp = PageGroup,
  307.             Child, MakeVarPop(hello, 1, SIZE_INTRO, ""),
  308.             Child, MakeVarPop(intro, 1, SIZE_INTRO, ""),
  309.             Child, MakeVarPop(bye, 1, SIZE_INTRO, ""),
  310.          End,
  311.          MUIA_ShortHelp, help,
  312.       End)
  313.    {
  314.       DoMethod(cycl, MUIM_Notify, MUIA_Cycle_Active, MUIV_EveryTime, pgrp, 3, MUIM_Set, MUIA_Group_ActivePage, MUIV_TriggerValue);
  315.    }
  316.    return grp;
  317. }
  318.  
  319. ///
  320. /// MakeStaticCheck
  321. //  Creates non-interactive checkmark gadget
  322. LOCAL Object *MakeStaticCheck(void)
  323. {
  324.    return
  325.    ImageObject,
  326.       ImageButtonFrame,
  327.       MUIA_Image_Spec  , MUII_CheckMark,
  328.       MUIA_Background  , MUII_ButtonBack,
  329.       MUIA_ShowSelState, FALSE,
  330.       MUIA_Selected    , TRUE,
  331.       MUIA_Disabled    , TRUE,
  332.    End;
  333. }
  334.  
  335. ///
  336. /// CO_PlaySoundFunc
  337. //  Plays sound file referred by the string gadget
  338. void SAVEDS ASM CO_PlaySoundFunc(REG(a1,int *arg))
  339. {
  340.    PlaySound(GetMUIStringPtr((struct Object *)arg[0]));
  341. }
  342. MakeHook(CO_PlaySoundHook,CO_PlaySoundFunc);
  343. ///
  344.  
  345. /*** Pages ***/
  346. /// CO_Page0  (Start)
  347. APTR CO_Page0(struct CO_ClassData *data)
  348. {
  349.    APTR grp;
  350.    static char *tzone[26];
  351.    tzone[ 0] = GetStr(MSG_CO_TZoneM12);
  352.    tzone[ 1] = GetStr(MSG_CO_TZoneM11);
  353.    tzone[ 2] = GetStr(MSG_CO_TZoneM10);
  354.    tzone[ 3] = GetStr(MSG_CO_TZoneM9);
  355.    tzone[ 4] = GetStr(MSG_CO_TZoneM8);
  356.    tzone[ 5] = GetStr(MSG_CO_TZoneM7);
  357.    tzone[ 6] = GetStr(MSG_CO_TZoneM6);
  358.    tzone[ 7] = GetStr(MSG_CO_TZoneM5);
  359.    tzone[ 8] = GetStr(MSG_CO_TZoneM4);
  360.    tzone[ 9] = GetStr(MSG_CO_TZoneM3);
  361.    tzone[10] = GetStr(MSG_CO_TZoneM2);
  362.    tzone[11] = GetStr(MSG_CO_TZoneM1);
  363.    tzone[12] = GetStr(MSG_CO_TZone0);
  364.    tzone[13] = GetStr(MSG_CO_TZone1);
  365.    tzone[14] = GetStr(MSG_CO_TZone2);
  366.    tzone[15] = GetStr(MSG_CO_TZone3);
  367.    tzone[16] = GetStr(MSG_CO_TZone4);
  368.    tzone[17] = GetStr(MSG_CO_TZone5);
  369.    tzone[18] = GetStr(MSG_CO_TZone6);
  370.    tzone[19] = GetStr(MSG_CO_TZone7);
  371.    tzone[20] = GetStr(MSG_CO_TZone8);
  372.    tzone[21] = GetStr(MSG_CO_TZone9);
  373.    tzone[22] = GetStr(MSG_CO_TZone10);
  374.    tzone[23] = GetStr(MSG_CO_TZone11);
  375.    tzone[24] = GetStr(MSG_CO_TZone12);
  376.    tzone[25] = NULL;
  377.    if (grp = VGroup,
  378.          MUIA_HelpNode, "CO00",
  379.          Child, HVSpace,
  380.          Child, ColGroup(2), GroupFrameT(GetStr(MSG_CO_MinConfig)),
  381.             Child, Label2(GetStr(MSG_CO_RealName)),
  382.             Child, data->GUI.ST_REALNAME = MakeString(SIZE_REALNAME,GetStr(MSG_CO_RealName)),
  383.             Child, Label2(GetStr(MSG_CO_EmailAddress)),
  384.             Child, data->GUI.ST_EMAIL    = MakeString(SIZE_ADDRESS,GetStr(MSG_CO_EmailAddress)),
  385.             Child, Label2(GetStr(MSG_CO_POPServer)),
  386.             Child, data->GUI.ST_POPHOST0  = MakeString(SIZE_HOST,GetStr(MSG_CO_POPServer)),
  387.             Child, Label2(GetStr(MSG_CO_Password)),
  388.             Child, data->GUI.ST_PASSWD0   = MakePassString(GetStr(MSG_CO_Password)),
  389.          End,
  390.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_TimeZone)),
  391.             Child, data->GUI.CY_TZONE = MakeCycle(tzone,GetStr(MSG_CO_TimeZone)),
  392.             Child, MakeCheckGroup((Object **)&data->GUI.CH_DLSAVING, GetStr(MSG_CO_DaylightSaving)),
  393.          End,
  394.          Child, HVSpace,
  395.       End)
  396.    {
  397.       SetHelp(data->GUI.ST_REALNAME  ,MSG_HELP_CO_ST_REALNAME  );
  398.       SetHelp(data->GUI.ST_EMAIL     ,MSG_HELP_CO_ST_EMAIL     );
  399.       SetHelp(data->GUI.ST_POPHOST0  ,MSG_HELP_CO_ST_POPHOST   );
  400.       SetHelp(data->GUI.ST_PASSWD0   ,MSG_HELP_CO_ST_PASSWD    );
  401.       SetHelp(data->GUI.CY_TZONE     ,MSG_HELP_CO_CY_TZONE     );
  402.       SetHelp(data->GUI.CH_DLSAVING  ,MSG_HELP_CO_CH_DLSAVING  );
  403.       set(data->GUI.CH_DLSAVING, MUIA_Disabled, G->CO_DST > 0);
  404.       if (G->Locale) set(data->GUI.CY_TZONE, MUIA_Disabled, TRUE);
  405.       DoMethod(data->GUI.ST_POPHOST0 ,MUIM_Notify,MUIA_String_Contents, MUIV_EveryTime,MUIV_Notify_Application ,3,MUIM_CallHook,&CO_GetDefaultPOPHook,0);
  406.       DoMethod(data->GUI.ST_PASSWD0  ,MUIM_Notify,MUIA_String_Contents, MUIV_EveryTime,MUIV_Notify_Application ,3,MUIM_CallHook,&CO_GetDefaultPOPHook,0);
  407.    }
  408.    return grp;
  409. }
  410.  
  411. ///
  412. /// CO_Page1  (TCP/IP)
  413. APTR CO_Page1(struct CO_ClassData *data)
  414. {
  415.    APTR grp, authgrp;
  416.  
  417.    if (grp = VGroup,
  418.          MUIA_HelpNode, "CO01",
  419.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_SendMail)),
  420.                 Child, HGroup,
  421.                     Child, VGroup,
  422.                         Child, ColGroup(2),
  423.                        Child, Label2(GetStr(MSG_CO_Server)),
  424.                        Child, data->GUI.ST_SMTPHOST = MakeString(SIZE_HOST,GetStr(MSG_CO_Server)),
  425.                        Child, Label2(GetStr(MSG_CO_Domain)),
  426.                        Child, data->GUI.ST_DOMAIN = MakeString(SIZE_HOST,GetStr(MSG_CO_Domain)),
  427.                         End,
  428.                    Child, MakeCheckGroup((Object **)&data->GUI.CH_SMTP8BIT, GetStr(MSG_CO_Allow8bit)),
  429.                     End,
  430.                     Child, VGroup,
  431.                         Child, authgrp=ColGroup(2),
  432.                        Child, Label2(GetStr(MSG_CO_SMTPUser)),
  433.                        Child, data->GUI.ST_SMTPAUTHUSER = MakeString(SIZE_USERID,GetStr(MSG_CO_SMTPUser)),
  434.                        Child, Label2(GetStr(MSG_CO_SMTPPass)),
  435.                        Child, data->GUI.ST_SMTPAUTHPASS = MakePassString(GetStr(MSG_CO_SMTPPass)),
  436.                         End,
  437.                    Child, MakeCheckGroup((Object **)&data->GUI.CH_USESMTPAUTH, GetStr(MSG_CO_UseSMTPAUTH)),
  438.                     End,
  439.                 End,
  440.          End,
  441.          Child, HGroup, GroupFrameT(GetStr(MSG_CO_ReceiveMail)),
  442.             Child, ListviewObject,
  443.                MUIA_Weight, 60,
  444.                MUIA_CycleChain, 1,
  445.                MUIA_Listview_List, data->GUI.LV_POP3 = ListObject,
  446.                   InputListFrame,
  447.                End,
  448.             End,
  449.             Child, VGroup,
  450.                Child, data->GUI.GR_POP3 = VGroup,
  451.                   Child, ColGroup(2),
  452.                      Child, Label2(GetStr(MSG_CO_POPServer)),
  453.                      Child, data->GUI.ST_POPHOST = MakeString(SIZE_HOST,GetStr(MSG_CO_POPServer)),
  454.                      Child, Label2(GetStr(MSG_CO_POPUserID)),
  455.                      Child, data->GUI.ST_POPUSERID = MakeString(SIZE_USERID,GetStr(MSG_CO_POPUserID)),
  456.                      Child, Label2(GetStr(MSG_CO_Password)),
  457.                      Child, data->GUI.ST_PASSWD = MakePassString(GetStr(MSG_CO_Password)),
  458.                   End,
  459.                   Child, MakeCheckGroup((Object **)&data->GUI.CH_POPENABLED, GetStr(MSG_CO_POPActive)),
  460.                   Child, MakeCheckGroup((Object **)&data->GUI.CH_USEAPOP, GetStr(MSG_CO_UseAPOP)),
  461.                   Child, MakeCheckGroup((Object **)&data->GUI.CH_DELETE, GetStr(MSG_CO_DeleteServerMail)),
  462.                End,
  463.                Child, HVSpace,
  464.                Child, ColGroup(2),
  465.                   Child, data->GUI.BT_PADD = MakeButton(GetStr(MSG_Add)),
  466.                   Child, data->GUI.BT_PDEL = MakeButton(GetStr(MSG_Del)),
  467.                End,
  468.             End,
  469.          End,
  470.       End)
  471.    {
  472.       SetHelp(data->GUI.ST_SMTPHOST    ,MSG_HELP_CO_ST_SMTPHOST  );
  473.       SetHelp(data->GUI.ST_DOMAIN      ,MSG_HELP_CO_ST_DOMAIN    );
  474.       SetHelp(data->GUI.CH_SMTP8BIT    ,MSG_HELP_CO_CH_SMTP8BIT  );
  475. //      SetHelp(data->GUI.CH_USESMTPAUTH ,MSG_HELP_CO_CH_USESMTPAUTH);
  476. //      SetHelp(data->GUI.ST_SMTPAUTHUSER,MSG_HELP_CO_CH_SMTPAUTHUSER);
  477. //      SetHelp(data->GUI.ST_SMTPAUTHPASS,MSG_HELP_CO_CH_SMTPAUTHPASS);
  478.       SetHelp(data->GUI.LV_POP3        ,MSG_HELP_CO_LV_POP3      );
  479.       SetHelp(data->GUI.BT_PADD        ,MSG_HELP_CO_BT_PADD      );
  480.       SetHelp(data->GUI.BT_PDEL        ,MSG_HELP_CO_BT_PDEL      );
  481.       SetHelp(data->GUI.ST_POPHOST     ,MSG_HELP_CO_ST_POPHOST   );
  482.       SetHelp(data->GUI.ST_POPUSERID   ,MSG_HELP_CO_ST_POPUSERID );
  483.       SetHelp(data->GUI.ST_PASSWD      ,MSG_HELP_CO_ST_PASSWD    );
  484.       SetHelp(data->GUI.CH_DELETE      ,MSG_HELP_CO_CH_DELETE    );
  485.       SetHelp(data->GUI.CH_USEAPOP     ,MSG_HELP_CO_CH_USEAPOP   );
  486.       SetHelp(data->GUI.CH_POPENABLED  ,MSG_HELP_CO_CH_POPENABLED);
  487.       DoMethod(grp,MUIM_MultiSet,MUIA_Disabled,TRUE,data->GUI.GR_POP3,
  488.                     data->GUI.BT_PDEL, authgrp, NULL);
  489.       DoMethod(data->GUI.LV_POP3       ,MUIM_Notify,MUIA_List_Active    ,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook ,&CO_GetP3EntryHook,0);
  490.       DoMethod(data->GUI.ST_POPHOST    ,MUIM_Notify,MUIA_String_Contents,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook ,&CO_PutP3EntryHook,0);
  491.       DoMethod(data->GUI.ST_POPUSERID  ,MUIM_Notify,MUIA_String_Contents,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook ,&CO_PutP3EntryHook,0);
  492.       DoMethod(data->GUI.ST_PASSWD     ,MUIM_Notify,MUIA_String_Contents,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook ,&CO_PutP3EntryHook,0);
  493.       DoMethod(data->GUI.CH_POPENABLED ,MUIM_Notify,MUIA_Selected       ,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook ,&CO_PutP3EntryHook,0);
  494.       DoMethod(data->GUI.CH_USEAPOP    ,MUIM_Notify,MUIA_Selected       ,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook ,&CO_PutP3EntryHook,0);
  495.       DoMethod(data->GUI.CH_DELETE     ,MUIM_Notify,MUIA_Selected       ,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook ,&CO_PutP3EntryHook,0);
  496.       DoMethod(data->GUI.BT_PADD       ,MUIM_Notify,MUIA_Pressed        ,FALSE         ,MUIV_Notify_Application,3,MUIM_CallHook ,&CO_AddPOP3Hook,0);
  497.       DoMethod(data->GUI.BT_PDEL       ,MUIM_Notify,MUIA_Pressed        ,FALSE         ,MUIV_Notify_Application,3,MUIM_CallHook ,&CO_DelPOP3Hook,0);
  498.       DoMethod(data->GUI.CH_USESMTPAUTH,MUIM_Notify,MUIA_Selected,MUIV_EveryTime,authgrp,3,MUIM_Set,MUIA_Disabled,MUIV_NotTriggerValue);
  499.    }
  500.    return grp;
  501. }
  502.  
  503. ///
  504. /// CO_Page2  (New Mail)
  505. APTR CO_Page2(struct CO_ClassData *data)
  506. {
  507.    static char *mpsopt[5], *trwopt[4];
  508.    APTR grp, pa_notisound, bt_notisound, pa_noticmd;
  509.    mpsopt[0] = GetStr(MSG_CO_PSNever);
  510.    mpsopt[1] = GetStr(MSG_CO_PSLarge);
  511.    mpsopt[2] = GetStr(MSG_CO_PSAlways);
  512.    mpsopt[3] = GetStr(MSG_CO_PSAlwaysFast);
  513.    mpsopt[4] = NULL;
  514.    trwopt[0] = GetStr(MSG_CO_TWNever);
  515.    trwopt[1] = GetStr(MSG_CO_TWAuto);
  516.    trwopt[2] = GetStr(MSG_CO_TWAlways);
  517.    trwopt[3] = NULL;
  518.    if (grp = VGroup,
  519.          MUIA_HelpNode, "CO02",
  520.          Child, HVSpace,
  521.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_Download)),
  522.             Child, ColGroup(6),
  523.                Child, Label1(GetStr(MSG_CO_PreSelect)),
  524.                Child, data->GUI.CY_MSGSELECT = MakeCycle(mpsopt, GetStr(MSG_CO_PreSelect)),
  525.                Child, HSpace(8),
  526.                Child, Label1(GetStr(MSG_CO_WarnSize1)),
  527.                Child, data->GUI.ST_WARNSIZE = MakeInteger(5, GetStr(MSG_CO_WarnSize1)),
  528.                Child, Label2(GetStr(MSG_CO_WarnSize2)),
  529.                Child, LLabel1(GetStr(MSG_CO_TransferWin)),
  530.                Child, data->GUI.CY_TRANSWIN = MakeCycle(trwopt, GetStr(MSG_CO_TransferWin)),
  531.                Child, HSpace(0),
  532.                Child, HSpace(0),
  533.                Child, HSpace(0),
  534.             End,
  535.             Child, HGroup,
  536.                Child, data->GUI.CH_AVOIDDUP = MakeCheck(GetStr(MSG_CO_AvoidDuplicates)),
  537.                Child, LLabel1(GetStr(MSG_CO_AvoidDuplicates)),
  538.                Child, HSpace(0),
  539.                Child, data->GUI.CH_UPDSTAT = MakeCheck(GetStr(MSG_CO_UpdateStatus)),
  540.                Child, LLabel1(GetStr(MSG_CO_UpdateStatus)),
  541.             End,
  542.          End,
  543.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_AutoOperation)),
  544.             Child, HGroup,
  545.                Child, Label2(GetStr(MSG_CO_CheckMail)),
  546.                Child, data->GUI.ST_INTERVAL = MakeInteger(4, GetStr(MSG_CO_CheckMail)),
  547.                Child, Label2(GetStr(MSG_CO_Minutes)),
  548.                Child, HSpace(0),
  549.             End,
  550.             Child, MakeCheckGroup((Object **)&data->GUI.CH_DLLARGE, GetStr(MSG_CO_DownloadLarge)),
  551.          End,
  552.          Child, ColGroup(3), GroupFrameT(GetStr(MSG_CO_Notification)),
  553.             Child, data->GUI.CH_NOTIREQ = MakeCheck(GetStr(MSG_CO_NotiReq)),
  554.             Child, LLabel1(GetStr(MSG_CO_NotiReq)),
  555.             Child, HSpace(0),
  556.             Child, data->GUI.CH_NOTISOUND = MakeCheck(GetStr(MSG_CO_NotiSound)),
  557.             Child, LLabel2(GetStr(MSG_CO_NotiSound)),
  558.             Child, HGroup,
  559.                MUIA_Group_HorizSpacing, 0,
  560.                Child, pa_notisound = PopaslObject,
  561.                   MUIA_Popasl_Type     ,0,
  562.                   MUIA_Popstring_String,data->GUI.ST_NOTISOUND = MakeString(SIZE_PATHFILE,""),
  563.                   MUIA_Popstring_Button,PopButton(MUII_PopFile),
  564.                End,
  565.                Child, bt_notisound = PopButton(MUII_TapePlay),
  566.             End,
  567.             Child, data->GUI.CH_NOTICMD = MakeCheck(GetStr(MSG_CO_NotiCommand)),
  568.             Child, LLabel2(GetStr(MSG_CO_NotiCommand)),
  569.             Child, pa_noticmd = PopaslObject,
  570.                MUIA_Popasl_Type     ,0,
  571.                MUIA_Popstring_String,data->GUI.ST_NOTICMD = MakeString(SIZE_COMMAND,""),
  572.                MUIA_Popstring_Button,PopButton(MUII_PopFile),
  573.             End,
  574.          End,
  575.          Child, HVSpace,
  576.       End)
  577.    {
  578.       SetHelp(data->GUI.CH_AVOIDDUP  ,MSG_HELP_CO_CH_AVOIDDUP  );
  579.       SetHelp(data->GUI.CY_TRANSWIN  ,MSG_HELP_CO_CH_TRANSWIN  );
  580.       SetHelp(data->GUI.CY_MSGSELECT ,MSG_HELP_CO_CY_MSGSELECT );
  581.       SetHelp(data->GUI.CH_UPDSTAT   ,MSG_HELP_CO_CH_UPDSTAT   );
  582.       SetHelp(data->GUI.ST_WARNSIZE  ,MSG_HELP_CO_ST_WARNSIZE  );
  583.       SetHelp(data->GUI.ST_INTERVAL  ,MSG_HELP_CO_ST_INTERVAL  );
  584.       SetHelp(data->GUI.CH_DLLARGE   ,MSG_HELP_CO_CH_DLLARGE   );
  585.       SetHelp(data->GUI.CH_NOTIREQ   ,MSG_HELP_CO_CH_NOTIREQ   );
  586.       SetHelp(data->GUI.ST_NOTICMD   ,MSG_HELP_CO_ST_NOTICMD   );
  587.       SetHelp(data->GUI.ST_NOTISOUND ,MSG_HELP_CO_ST_NOTISOUND );
  588.       DoMethod(G->App, MUIM_MultiSet, MUIA_Disabled, TRUE, pa_notisound, bt_notisound, pa_noticmd, NULL);
  589.       set(bt_notisound,MUIA_CycleChain,1);
  590.       DoMethod(bt_notisound          ,MUIM_Notify,MUIA_Pressed ,FALSE         ,MUIV_Notify_Application,3,MUIM_CallHook,&CO_PlaySoundHook,data->GUI.ST_NOTISOUND);
  591.       DoMethod(data->GUI.CH_NOTISOUND,MUIM_Notify,MUIA_Selected,MUIV_EveryTime,pa_notisound           ,3,MUIM_Set,MUIA_Disabled,MUIV_NotTriggerValue);
  592.       DoMethod(data->GUI.CH_NOTISOUND,MUIM_Notify,MUIA_Selected,MUIV_EveryTime,bt_notisound           ,3,MUIM_Set,MUIA_Disabled,MUIV_NotTriggerValue);
  593.       DoMethod(data->GUI.CH_NOTICMD  ,MUIM_Notify,MUIA_Selected,MUIV_EveryTime,pa_noticmd             ,3,MUIM_Set,MUIA_Disabled,MUIV_NotTriggerValue);
  594.    }
  595.    return grp;
  596. }
  597.  
  598. ///
  599. /// CO_Page3  (Rules)
  600. APTR CO_Page3(struct CO_ClassData *data)
  601. {
  602.    static char *bcrit[5], *rtitles[4];
  603.    APTR grp, po_response, po_execute, po_play, bt_aplay, bt_moveto;
  604.    bcrit[0] = GetStr(MSG_CO_CTNone);
  605.    bcrit[1] = GetStr(MSG_CO_CTOr);
  606.    bcrit[2] = GetStr(MSG_CO_CTAnd);
  607.    bcrit[3] = GetStr(MSG_CO_CTXor);
  608.    bcrit[4] = NULL;
  609.    rtitles[0] = GetStr(MSG_Options);
  610.    rtitles[1] = GetStr(MSG_CO_Comparison);
  611.    rtitles[2] = GetStr(MSG_CO_Action);
  612.    rtitles[3] = NULL;
  613.    if (grp = HGroup,
  614.          MUIA_HelpNode, "CO03",
  615.          MUIA_Background, MUII_GroupBack,
  616.          Child, VGroup,
  617.             MUIA_Weight, 50,
  618.             Child, ListviewObject,
  619.                MUIA_CycleChain, 1,
  620.                MUIA_Listview_DragType, MUIV_Listview_DragType_Immediate,
  621.                MUIA_Listview_List, data->GUI.LV_RULES = ListObject,
  622.                   MUIA_List_DragSortable, TRUE,
  623.                   InputListFrame,
  624.                End,
  625.             End,
  626.             Child, ColGroup(2),
  627.                Child, data->GUI.BT_RADD = MakeButton(GetStr(MSG_Add)),
  628.                Child, data->GUI.BT_RDEL = MakeButton(GetStr(MSG_Del)),
  629.             End,
  630.          End,
  631.          Child, RegisterGroup(rtitles),
  632.             MUIA_CycleChain,1,
  633.             Child, VGroup,
  634.                Child, HGroup,
  635.                   Child, Label2(GetStr(MSG_CO_Name)),
  636.                   Child, data->GUI.ST_RNAME = MakeString(SIZE_NAME,GetStr(MSG_CO_Name)),
  637.                End,
  638.                Child, MakeCheckGroup((Object **)&data->GUI.CH_REMOTE, GetStr(MSG_CO_Remote)),
  639.                Child, MakeCheckGroup((Object **)&data->GUI.CH_APPLYNEW, GetStr(MSG_CO_ApplyToNew)),
  640.                Child, MakeCheckGroup((Object **)&data->GUI.CH_APPLYSENT, GetStr(MSG_CO_ApplyToSent)),
  641.                Child, MakeCheckGroup((Object **)&data->GUI.CH_APPLYREQ, GetStr(MSG_CO_ApplyOnReq)),
  642.                Child, HVSpace,
  643.             End,
  644.             Child, data->GUI.GR_LRGROUP = PageGroup,
  645.                Child, data->GUI.GR_LOCAL = VGroup,
  646.                   Child, FI_ConstructSearchGroup(&data->GUI.GR_SEARCH[0], FALSE),
  647.                   Child, data->GUI.CY_COMBINE[0] = MakeCycle(bcrit,""),
  648.                   Child, FI_ConstructSearchGroup(&data->GUI.GR_SEARCH[1], FALSE),
  649.                   Child, HVSpace,
  650.                End,
  651.                Child, data->GUI.GR_REMOTE = VGroup,
  652.                   Child, FI_ConstructSearchGroup(&data->GUI.GR_SEARCH[2], TRUE),
  653.                   Child, data->GUI.CY_COMBINE[1] = MakeCycle(bcrit,""),
  654.                   Child, FI_ConstructSearchGroup(&data->GUI.GR_SEARCH[3], TRUE),
  655.                   Child, HVSpace,
  656.                End,
  657.             End,
  658.             Child, VGroup,
  659.                Child, ColGroup(3),
  660.                   Child, data->GUI.CH_ABOUNCE = MakeCheck(GetStr(MSG_CO_ActionBounce)),
  661.                   Child, LLabel2(GetStr(MSG_CO_ActionBounce)),
  662.                   Child, data->GUI.ST_ABOUNCE = MakeString(SIZE_ADDRESS, ""),
  663.                   Child, data->GUI.CH_AFORWARD = MakeCheck(GetStr(MSG_CO_ActionForward)),
  664.                   Child, LLabel2(GetStr(MSG_CO_ActionForward)),
  665.                   Child, data->GUI.ST_AFORWARD = MakeString(SIZE_ADDRESS, ""),
  666.                   Child, data->GUI.CH_ARESPONSE = MakeCheck(GetStr(MSG_CO_ActionReply)),
  667.                   Child, LLabel2(GetStr(MSG_CO_ActionReply)),
  668.                   Child, po_response = PopaslObject,
  669.                      MUIA_Popstring_String, data->GUI.ST_ARESPONSE = MakeString(SIZE_PATHFILE, ""),
  670.                      MUIA_Popstring_Button, PopButton(MUII_PopFile),
  671.                   End,
  672.                   Child, data->GUI.CH_AEXECUTE = MakeCheck(GetStr(MSG_CO_ActionExecute)),
  673.                   Child, LLabel2(GetStr(MSG_CO_ActionExecute)),
  674.                   Child, po_execute = PopaslObject,
  675.                      MUIA_Popstring_String, data->GUI.ST_AEXECUTE = MakeString(SIZE_PATHFILE, ""),
  676.                      MUIA_Popstring_Button, PopButton(MUII_PopFile),
  677.                   End,
  678.                   Child, data->GUI.CH_APLAY = MakeCheck(GetStr(MSG_CO_ActionPlay)),
  679.                   Child, LLabel2(GetStr(MSG_CO_ActionPlay)),
  680.                   Child, HGroup,
  681.                      MUIA_Group_HorizSpacing, 0,
  682.                      Child, po_play = PopaslObject,
  683.                         MUIA_Popstring_String, data->GUI.ST_APLAY = MakeString(SIZE_PATHFILE, ""),
  684.                         MUIA_Popstring_Button, PopButton(MUII_PopFile),
  685.                      End,
  686.                      Child, bt_aplay = PopButton(MUII_TapePlay),
  687.                   End,
  688.                   Child, data->GUI.CH_AMOVE = MakeCheck(GetStr(MSG_CO_ActionMove)),
  689.                   Child, LLabel2(GetStr(MSG_CO_ActionMove)),
  690.                   Child, data->GUI.PO_MOVETO = PopobjectObject,
  691.                       MUIA_Popstring_String, data->GUI.TX_MOVETO = TextObject,
  692.                          TextFrame,
  693.                       End,
  694.                       MUIA_Popstring_Button,bt_moveto = PopButton(MUII_PopUp),
  695.                       MUIA_Popobject_StrObjHook,&PO_InitFolderListHook,
  696.                       MUIA_Popobject_ObjStrHook,&PO_List2TextHook,
  697.                       MUIA_Popobject_WindowHook,&PO_WindowHook,
  698.                       MUIA_Popobject_Object, data->GUI.LV_MOVETO = ListviewObject,
  699.                          MUIA_Listview_List, ListObject, InputListFrame, End,
  700.                      End,
  701.                    End,
  702.                End,
  703.                Child, MakeCheckGroup((Object **)&data->GUI.CH_ADELETE, GetStr(MSG_CO_ActionDelete)),
  704.                Child, MakeCheckGroup((Object **)&data->GUI.CH_ASKIP, GetStr(MSG_CO_ActionSkip)),
  705.                Child, HVSpace,
  706.             End,
  707.          End,
  708.       End)
  709.    {
  710.       int i, j;
  711.       SetHelp(data->GUI.LV_RULES     ,MSG_HELP_CO_LV_RULES     );
  712.       SetHelp(data->GUI.ST_RNAME     ,MSG_HELP_CO_ST_RNAME     );
  713.       SetHelp(data->GUI.CH_REMOTE    ,MSG_HELP_CO_CH_REMOTE    );
  714.       SetHelp(data->GUI.CH_APPLYNEW  ,MSG_HELP_CO_CH_APPLYNEW  );
  715.       SetHelp(data->GUI.CH_APPLYSENT ,MSG_HELP_CO_CH_APPLYSENT );
  716.       SetHelp(data->GUI.CH_APPLYREQ  ,MSG_HELP_CO_CH_APPLYREQ  );
  717.       SetHelp(data->GUI.CY_COMBINE[0],MSG_HELP_CO_CY_COMBINE   );
  718.       SetHelp(data->GUI.CY_COMBINE[1],MSG_HELP_CO_CY_COMBINE   );
  719.       SetHelp(data->GUI.CH_ABOUNCE   ,MSG_HELP_CO_CH_ABOUNCE   );
  720.       SetHelp(data->GUI.ST_ABOUNCE   ,MSG_HELP_CO_ST_ABOUNCE   );
  721.       SetHelp(data->GUI.CH_AFORWARD  ,MSG_HELP_CO_CH_AFORWARD  );
  722.       SetHelp(data->GUI.ST_AFORWARD  ,MSG_HELP_CO_ST_AFORWARD  );
  723.       SetHelp(data->GUI.CH_ARESPONSE ,MSG_HELP_CO_CH_ARESPONSE );
  724.       SetHelp(data->GUI.ST_ARESPONSE ,MSG_HELP_CO_ST_ARESPONSE );
  725.       SetHelp(data->GUI.CH_AEXECUTE  ,MSG_HELP_CO_CH_AEXECUTE  );
  726.       SetHelp(data->GUI.ST_AEXECUTE  ,MSG_HELP_CO_ST_AEXECUTE  );
  727.       SetHelp(data->GUI.CH_APLAY     ,MSG_HELP_CO_CH_APLAY     );
  728.       SetHelp(data->GUI.ST_APLAY     ,MSG_HELP_CO_ST_APLAY     );
  729.       SetHelp(data->GUI.CH_AMOVE     ,MSG_HELP_CO_CH_AMOVE     );
  730.       SetHelp(data->GUI.PO_MOVETO    ,MSG_HELP_CO_PO_MOVETO    );
  731.       SetHelp(data->GUI.CH_ADELETE   ,MSG_HELP_CO_CH_ADELETE   );
  732.       SetHelp(data->GUI.CH_ASKIP     ,MSG_HELP_CO_CH_ASKIP     );
  733.       SetHelp(data->GUI.BT_RADD      ,MSG_HELP_CO_BT_RADD      );
  734.       SetHelp(data->GUI.BT_RDEL      ,MSG_HELP_CO_BT_RDEL      );
  735.       set(bt_aplay,MUIA_CycleChain,1);
  736.       set(bt_moveto,MUIA_CycleChain,1);
  737.       CO_RuleGhost(&(data->GUI), NULL);
  738.       DoMethod(data->GUI.LV_RULES    ,MUIM_Notify,MUIA_List_Active        ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_GetRUEntryHook);
  739.       DoMethod(data->GUI.ST_RNAME    ,MUIM_Notify,MUIA_String_Contents    ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  740.       DoMethod(data->GUI.CH_REMOTE   ,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook ,&CO_RemoteToggleHook,MUIV_TriggerValue);
  741.       DoMethod(data->GUI.CH_APPLYREQ ,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  742.       DoMethod(data->GUI.CH_APPLYSENT,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  743.       DoMethod(data->GUI.CH_APPLYNEW ,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  744.       DoMethod(data->GUI.CY_COMBINE[0],MUIM_Notify,MUIA_Cycle_Active       ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  745.       DoMethod(data->GUI.CY_COMBINE[1],MUIM_Notify,MUIA_Cycle_Active       ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  746.       DoMethod(data->GUI.CH_ABOUNCE  ,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  747.       DoMethod(data->GUI.CH_AFORWARD ,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  748.       DoMethod(data->GUI.CH_ARESPONSE,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  749.       DoMethod(data->GUI.CH_AEXECUTE ,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  750.       DoMethod(data->GUI.CH_APLAY    ,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  751.       DoMethod(data->GUI.CH_AMOVE    ,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  752.       DoMethod(data->GUI.CH_ADELETE  ,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  753.       DoMethod(data->GUI.CH_ASKIP    ,MUIM_Notify,MUIA_Selected           ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  754.       DoMethod(data->GUI.ST_ABOUNCE  ,MUIM_Notify,MUIA_String_Contents    ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  755.       DoMethod(data->GUI.ST_AFORWARD ,MUIM_Notify,MUIA_String_Contents    ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  756.       DoMethod(data->GUI.ST_ARESPONSE,MUIM_Notify,MUIA_String_Contents    ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  757.       DoMethod(data->GUI.ST_AEXECUTE ,MUIM_Notify,MUIA_String_Contents    ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  758.       DoMethod(data->GUI.ST_APLAY    ,MUIM_Notify,MUIA_String_Contents    ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  759.       DoMethod(bt_aplay              ,MUIM_Notify,MUIA_Pressed            ,FALSE         ,MUIV_Notify_Application,3,MUIM_CallHook, &CO_PlaySoundHook,data->GUI.ST_APLAY);
  760.       DoMethod(data->GUI.TX_MOVETO   ,MUIM_Notify,MUIA_Text_Contents      ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutRUEntryHook);
  761.       DoMethod(data->GUI.LV_MOVETO   ,MUIM_Notify,MUIA_Listview_DoubleClick,TRUE         ,data->GUI.PO_MOVETO   ,2,MUIM_Popstring_Close,TRUE);
  762.       DoMethod(data->GUI.LV_MOVETO   ,MUIM_Notify,MUIA_Listview_DoubleClick,TRUE         ,data->GUI.CH_AMOVE    ,3,MUIM_Set,MUIA_Selected,TRUE);
  763.       for (j = 0; j < 4; j++)
  764.       {
  765.          struct SearchGroup *sg = &(data->GUI.GR_SEARCH[j]);
  766.          DoMethod(sg->CY_MODE     ,MUIM_Notify,MUIA_Cycle_Active       ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook,&CO_PutRUEntryHook);
  767.          DoMethod(sg->RA_ADRMODE  ,MUIM_Notify,MUIA_Radio_Active       ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook,&CO_PutRUEntryHook);
  768.          DoMethod(sg->ST_FIELD    ,MUIM_Notify,MUIA_String_Contents    ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook,&CO_PutRUEntryHook);
  769.          DoMethod(sg->CY_STATUS   ,MUIM_Notify,MUIA_Cycle_Active       ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook,&CO_PutRUEntryHook);
  770.          for (i = 0; i < 5; i++)
  771.          {
  772.             if (sg->CY_COMP[i])     DoMethod(sg->CY_COMP[i]    ,MUIM_Notify,MUIA_Cycle_Active   ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook,&CO_PutRUEntryHook);
  773.             if (sg->ST_MATCH[i])    DoMethod(sg->ST_MATCH[i]   ,MUIM_Notify,MUIA_String_Contents,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook,&CO_PutRUEntryHook);
  774.             if (sg->CH_CASESENS[i]) DoMethod(sg->CH_CASESENS[i],MUIM_Notify,MUIA_Selected       ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook,&CO_PutRUEntryHook);
  775.             if (sg->CH_SUBSTR[i])   DoMethod(sg->CH_SUBSTR[i]  ,MUIM_Notify,MUIA_Selected       ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook,&CO_PutRUEntryHook);
  776.          }
  777.       }
  778.       DoMethod(data->GUI.BT_RADD      ,MUIM_Notify,MUIA_Pressed ,FALSE         ,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_AddRuleHook);
  779.       DoMethod(data->GUI.BT_RDEL      ,MUIM_Notify,MUIA_Pressed ,FALSE         ,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_DelRuleHook);
  780.       DoMethod(data->GUI.CH_AMOVE     ,MUIM_Notify,MUIA_Selected,TRUE          ,data->GUI.CH_ADELETE  ,3,MUIM_Set, MUIA_Selected,FALSE);
  781.       DoMethod(data->GUI.CH_ADELETE   ,MUIM_Notify,MUIA_Selected,TRUE          ,data->GUI.CH_AMOVE   , 3,MUIM_Set, MUIA_Selected,FALSE);
  782.    }
  783.    return grp;
  784. }
  785.  
  786. ///
  787. /// CO_Page4  (Read)
  788. APTR CO_Page4(struct CO_ClassData *data)
  789. {
  790.    APTR grp;
  791.    static char *headopt[4], *siopt[4], *slopt[5];
  792.    headopt[0] = GetStr(MSG_CO_HeadNone);
  793.    headopt[1] = GetStr(MSG_CO_HeadShort);
  794.    headopt[2] = GetStr(MSG_CO_HeadFull);
  795.    headopt[3] = NULL;
  796.    siopt[0] = GetStr(MSG_CO_SINone);
  797.    siopt[1] = GetStr(MSG_CO_SIFields);
  798.    siopt[2] = GetStr(MSG_CO_SIAll);
  799.    siopt[3] = NULL;
  800.    slopt[0] = GetStr(MSG_CO_SLBlank);
  801.    slopt[1] = GetStr(MSG_CO_SLDash);
  802.    slopt[2] = GetStr(MSG_CO_SLBar);
  803.    slopt[3] = GetStr(MSG_CO_SLSkip);
  804.    slopt[4] = NULL;
  805.    if (grp = VGroup,
  806.          MUIA_HelpNode, "CO04",
  807.          Child, ColGroup(3), GroupFrameT(GetStr(MSG_CO_HeaderLayout)),
  808.             Child, Label2(GetStr(MSG_CO_Header)),
  809.             Child, data->GUI.CY_HEADER = MakeCycle(headopt,GetStr(MSG_CO_Header)),
  810.             Child, data->GUI.ST_HEADERS = MakeString(SIZE_PATTERN, ""),
  811.             Child, Label1(GetStr(MSG_CO_SenderInfo)),
  812.             Child, data->GUI.CY_SENDERINFO = MakeCycle(siopt,GetStr(MSG_CO_SenderInfo)),
  813.             Child, MakeCheckGroup((Object **)&data->GUI.CH_WRAPHEAD, GetStr(MSG_CO_WrapHeader)),
  814.          End,
  815.          Child, ColGroup(3), GroupFrameT(GetStr(MSG_CO_BodyLayout)),
  816.             Child, Label1(GetStr(MSG_CO_SignatureSep)),
  817.             Child, data->GUI.CY_SIGSEPLINE = MakeCycle(slopt,GetStr(MSG_CO_SignatureSep)),
  818.             Child, MakeCheckGroup((Object **)&data->GUI.CH_FIXFEDIT, GetStr(MSG_CO_FixedFontEdit)),
  819.             Child, Label1(GetStr(MSG_CO_ColoredText)),
  820.             Child, data->GUI.CA_COLTEXT = PoppenObject, MUIA_CycleChain, 1, End,
  821.             Child, MakeCheckGroup((Object **)&data->GUI.CH_ALLTEXTS, GetStr(MSG_CO_DisplayAll)),
  822.             Child, Label1(GetStr(MSG_CO_OldQuotes)),
  823.             Child, data->GUI.CA_COL2QUOT = PoppenObject, MUIA_CycleChain, 1, End,
  824.             Child, MakeCheckGroup((Object **)&data->GUI.CH_TEXTSTYLES, GetStr(MSG_CO_UseTextstyles)),
  825.          End,
  826.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_OtherOptions)),
  827.             Child, HGroup,
  828.                Child, Label2(GetStr(MSG_CO_CharsetTrans)),
  829.                Child, MakeTransPop(&data->GUI.ST_INTRANS, FALSE, GetStr(MSG_CO_CharsetTrans)),
  830.             End,
  831.             Child, MakeCheckGroup((Object **)&data->GUI.CH_MULTIWIN, GetStr(MSG_CO_MultiReadWin)),
  832.          End,
  833.          Child, HVSpace,
  834.       End)
  835.    {
  836.       set(data->GUI.ST_HEADERS, MUIA_Disabled, TRUE);
  837.       SetHelp(data->GUI.CY_HEADER    ,MSG_HELP_CO_CY_HEADER    );
  838.       SetHelp(data->GUI.ST_HEADERS   ,MSG_HELP_CO_ST_HEADERS   );
  839.       SetHelp(data->GUI.CY_SENDERINFO,MSG_HELP_CO_CY_SENDERINFO);
  840.       SetHelp(data->GUI.ST_INTRANS   ,MSG_HELP_CO_ST_INTRANS   );
  841.       SetHelp(data->GUI.CA_COLTEXT   ,MSG_HELP_CO_CA_COLTEXT   );
  842.       SetHelp(data->GUI.CA_COL2QUOT  ,MSG_HELP_CO_CA_COL2QUOT  );
  843.       SetHelp(data->GUI.CH_ALLTEXTS  ,MSG_HELP_CO_CH_ALLTEXTS  );
  844.       SetHelp(data->GUI.CH_MULTIWIN  ,MSG_HELP_CO_CH_MULTIWIN  );
  845.       SetHelp(data->GUI.CY_SIGSEPLINE,MSG_HELP_CO_CY_SIGSEPLINE);
  846.       SetHelp(data->GUI.CH_FIXFEDIT  ,MSG_HELP_CO_CH_FIXFEDIT  );
  847.       SetHelp(data->GUI.CH_WRAPHEAD  ,MSG_HELP_CO_CH_WRAPHEAD  );
  848.       SetHelp(data->GUI.CH_TEXTSTYLES,MSG_HELP_CO_CH_TEXTSTYLES);
  849.       DoMethod(data->GUI.CY_HEADER   ,MUIM_Notify,MUIA_Cycle_Active   ,0             ,data->GUI.ST_HEADERS   ,3,MUIM_Set,MUIA_Disabled,TRUE);
  850.       DoMethod(data->GUI.CY_HEADER   ,MUIM_Notify,MUIA_Cycle_Active   ,1             ,data->GUI.ST_HEADERS   ,3,MUIM_Set,MUIA_Disabled,FALSE);
  851.       DoMethod(data->GUI.CY_HEADER   ,MUIM_Notify,MUIA_Cycle_Active   ,2             ,data->GUI.ST_HEADERS   ,3,MUIM_Set,MUIA_Disabled,TRUE);
  852.    }
  853.    return grp;
  854. }
  855.  
  856. ///
  857. /// CO_Page5  (Write)
  858. APTR CO_Page5(struct CO_ClassData *data)
  859. {
  860.    APTR grp;
  861.    static char *wrapmode[4];
  862.    wrapmode[0] = GetStr(MSG_CO_EWOff);
  863.    wrapmode[1] = GetStr(MSG_CO_EWAsYouType);
  864.    wrapmode[2] = GetStr(MSG_CO_EWBeforeSend);
  865.    wrapmode[3] = NULL;
  866.    if (grp = VGroup,
  867.          MUIA_HelpNode, "CO05",
  868.          Child, HVSpace,
  869.          Child, ColGroup(2), GroupFrameT(GetStr(MSG_CO_MessageHeader)),
  870.             Child, Label2(GetStr(MSG_CO_ReplyTo)),
  871.             Child, data->GUI.ST_REPLYTO  = MakeString(SIZE_ADDRESS,GetStr(MSG_CO_ReplyTo)),
  872.             Child, Label2(GetStr(MSG_CO_Organization)),
  873.             Child, data->GUI.ST_ORGAN = MakeString(SIZE_DEFAULT,GetStr(MSG_CO_Organization)),
  874.             Child, Label2(GetStr(MSG_CO_ExtraHeaders)),
  875.             Child, data->GUI.ST_EXTHEADER = MakeString(SIZE_LARGE,GetStr(MSG_CO_ExtraHeaders)),
  876.          End,
  877.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_MessageBody)),
  878.             Child, ColGroup(2),
  879.                Child, Label2(GetStr(MSG_CO_Welcome)),
  880.                Child, data->GUI.ST_HELLOTEXT = MakeString(SIZE_INTRO,GetStr(MSG_CO_Welcome)),
  881.                Child, Label2(GetStr(MSG_CO_Greetings)),
  882.                Child, data->GUI.ST_BYETEXT = MakeString(SIZE_INTRO,GetStr(MSG_CO_Greetings)),
  883.                Child, Label2(GetStr(MSG_CO_CharsetTrans)),
  884.                Child, MakeTransPop(&data->GUI.ST_OUTTRANS, TRUE, GetStr(MSG_CO_CharsetTrans)),
  885.             End,
  886.          End,
  887.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_Editor)),
  888.             Child, ColGroup(3),
  889.                Child, Label2(GetStr(MSG_CO_WordWrap)),
  890.                Child, data->GUI.ST_EDWRAP = MakeInteger(4, GetStr(MSG_CO_WordWrap)),
  891.                Child, data->GUI.CY_EDWRAP = MakeCycle(wrapmode, ""),
  892.                Child, Label2(GetStr(MSG_CO_ExternalEditor)),
  893.                Child, PopaslObject,
  894.                   MUIA_Popasl_Type     ,ASL_FileRequest,
  895.                   MUIA_Popstring_String,data->GUI.ST_EDITOR = MakeString(SIZE_PATHFILE,GetStr(MSG_CO_ExternalEditor)),
  896.                   MUIA_Popstring_Button,PopButton(MUII_PopFile),
  897.                End,
  898.                Child, MakeCheckGroup((Object **)&data->GUI.CH_LAUNCH, GetStr(MSG_CO_Launch)),
  899.             End,
  900.          End,
  901.          Child, HVSpace,
  902.       End)
  903.    {
  904.       SetHelp(data->GUI.ST_REPLYTO   ,MSG_HELP_CO_ST_REPLYTO  );
  905.       SetHelp(data->GUI.ST_ORGAN     ,MSG_HELP_CO_ST_ORGAN    );
  906.       SetHelp(data->GUI.ST_EXTHEADER ,MSG_HELP_CO_ST_EXTHEADER);
  907.       SetHelp(data->GUI.ST_HELLOTEXT ,MSG_HELP_CO_ST_HELLOTEXT);
  908.       SetHelp(data->GUI.ST_BYETEXT   ,MSG_HELP_CO_ST_BYETEXT  );
  909.       SetHelp(data->GUI.ST_OUTTRANS  ,MSG_HELP_CO_ST_OUTTRANS );
  910.       SetHelp(data->GUI.ST_EDWRAP    ,MSG_HELP_CO_ST_EDWRAP   );
  911.       SetHelp(data->GUI.CY_EDWRAP    ,MSG_HELP_CO_CY_EDWRAP   );
  912.       SetHelp(data->GUI.ST_EDITOR    ,MSG_HELP_CO_ST_EDITOR   );
  913.       SetHelp(data->GUI.CH_LAUNCH    ,MSG_HELP_CO_CH_LAUNCH   );
  914.    }
  915.    return grp;
  916. }
  917.  
  918. ///
  919. /// CO_Page6  (Reply/Forward)
  920. APTR CO_Page6(struct CO_ClassData *data)
  921. {
  922.    APTR grp;
  923.    if (grp = VGroup,
  924.          MUIA_HelpNode, "CO06",
  925.          Child, HVSpace,
  926.          Child, ColGroup(2), GroupFrameT(GetStr(MSG_CO_Forwarding)),
  927.             Child, Label2(GetStr(MSG_CO_FwdInit)),
  928.             Child, MakeVarPop(&data->GUI.ST_FWDSTART, 0, SIZE_INTRO, GetStr(MSG_CO_FwdInit)),
  929.             Child, Label2(GetStr(MSG_CO_FwdFinish)),
  930.             Child, MakeVarPop(&data->GUI.ST_FWDEND, 0, SIZE_INTRO, GetStr(MSG_CO_FwdFinish)),
  931.          End,
  932.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_Replying)),
  933.             Child, ColGroup(2),
  934.                Child, Label2(GetStr(MSG_CO_RepInit)),
  935.                Child, MakePhraseGroup(&data->GUI.ST_REPLYHI, &data->GUI.ST_REPLYTEXT, &data->GUI.ST_REPLYBYE, GetStr(MSG_CO_RepInit), GetStr(MSG_HELP_CO_ST_REPLYTEXT)),
  936.                Child, Label2(GetStr(MSG_CO_AltRepInit)),
  937.                Child, MakePhraseGroup(&data->GUI.ST_AREPLYHI, &data->GUI.ST_AREPLYTEXT, &data->GUI.ST_AREPLYBYE, GetStr(MSG_CO_AltRepInit), GetStr(MSG_HELP_CO_ST_AREPLYTEXT)),
  938.                Child, Label2(GetStr(MSG_CO_AltRepPat)),
  939.                Child, data->GUI.ST_AREPLYPAT = MakeString(SIZE_PATTERN, GetStr(MSG_CO_AltRepPat)),
  940.                Child, Label2(GetStr(MSG_CO_MLRepInit)),
  941.                Child, MakePhraseGroup(&data->GUI.ST_MREPLYHI, &data->GUI.ST_MREPLYTEXT, &data->GUI.ST_MREPLYBYE, GetStr(MSG_CO_MLRepInit), GetStr(MSG_HELP_CO_ST_MREPLYTEXT)),
  942.                     Child, Label2(GetStr(MSG_CO_QuoteMail)),
  943.                     Child, MakeVarPop(&data->GUI.ST_REPLYCHAR, 2, SIZE_SMALL, GetStr(MSG_CO_QuoteMail)),
  944.                     Child, Label2(GetStr(MSG_CO_AltQuote)),
  945.                     Child, data->GUI.ST_ALTQUOTECHAR = MakeString(SIZE_SMALL, GetStr(MSG_CO_AltQuote)),
  946.             End,
  947.             Child, ColGroup(2),
  948.                Child, MakeCheckGroup((Object **)&data->GUI.CH_QUOTE, GetStr(MSG_CO_DoQuote)),
  949.                Child, MakeCheckGroup((Object **)&data->GUI.CH_QUOTEEMPTY, GetStr(MSG_CO_QuoteEmpty)),
  950.                Child, MakeCheckGroup((Object **)&data->GUI.CH_COMPADDR, GetStr(MSG_CO_VerifyAddress)),
  951.                Child, MakeCheckGroup((Object **)&data->GUI.CH_STRIPSIG, GetStr(MSG_CO_StripSignature)),
  952.             End,
  953.          End,
  954.          Child, HVSpace,
  955.       End)
  956.    {
  957.       SetHelp(data->GUI.ST_FWDSTART    ,MSG_HELP_CO_ST_FWDSTART  );
  958.       SetHelp(data->GUI.ST_FWDEND      ,MSG_HELP_CO_ST_FWDEND    );
  959.       SetHelp(data->GUI.ST_AREPLYPAT   ,MSG_HELP_CO_ST_AREPLYPAT );
  960.       SetHelp(data->GUI.CH_QUOTE       ,MSG_HELP_CO_CH_QUOTE     );
  961.       SetHelp(data->GUI.ST_REPLYCHAR   ,MSG_HELP_CO_ST_REPLYCHAR );
  962.       SetHelp(data->GUI.ST_ALTQUOTECHAR,MSG_HELP_CO_ST_ALTQUOTECHAR);
  963.       SetHelp(data->GUI.CH_QUOTEEMPTY  ,MSG_HELP_CO_CH_QUOTEEMPTY);
  964.       SetHelp(data->GUI.CH_COMPADDR    ,MSG_HELP_CO_CH_COMPADDR  );
  965.       SetHelp(data->GUI.CH_STRIPSIG    ,MSG_HELP_CO_CH_STRIPSIG  );
  966.       DoMethod(data->GUI.CH_QUOTE      ,MUIM_Notify,MUIA_Selected,MUIV_EveryTime,data->GUI.ST_REPLYCHAR,3,MUIM_Set,MUIA_Disabled,MUIV_NotTriggerValue);
  967.       DoMethod(data->GUI.CH_QUOTE      ,MUIM_Notify,MUIA_Selected,MUIV_EveryTime,data->GUI.CH_QUOTEEMPTY,3,MUIM_Set,MUIA_Disabled,MUIV_NotTriggerValue);
  968.       DoMethod(data->GUI.CH_QUOTE      ,MUIM_Notify,MUIA_Selected,MUIV_EveryTime,data->GUI.CH_STRIPSIG,3,MUIM_Set,MUIA_Disabled,MUIV_NotTriggerValue);
  969.    }
  970.    return grp;
  971. }
  972.  
  973. ///
  974. /// CO_Page7  (Signature)
  975. APTR CO_Page7(struct CO_ClassData *data)
  976. {
  977.    static char *signat[4];
  978.    APTR grp, slider = ScrollbarObject, End;
  979.    signat[0] = GetStr(MSG_CO_DefSig);
  980.    signat[1] = GetStr(MSG_CO_AltSig1);
  981.    signat[2] = GetStr(MSG_CO_AltSig2);
  982.    signat[3] = NULL;
  983.    if (grp = VGroup,
  984.          MUIA_HelpNode, "CO07",
  985.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_Signature)),
  986.             Child, MakeCheckGroup((Object **)&data->GUI.CH_USESIG, GetStr(MSG_CO_UseSig)),
  987.             Child, HGroup,
  988.                Child, data->GUI.CY_SIGNAT = MakeCycle(signat,""),
  989.                Child, data->GUI.BT_SIGEDIT = MakeButton(GetStr(MSG_CO_EditSig)),
  990.             End,
  991.             Child, HGroup,
  992.                MUIA_Group_Spacing, 0,
  993.                Child, data->GUI.TE_SIGEDIT = NewObject(CL_TextEditor->mcc_Class, NULL,
  994.                   InputListFrame,
  995.                   MUIA_TextEditor_ExportHook, MUIV_TextEditor_ExportHook_EMail,
  996.                   MUIA_CycleChain, TRUE,
  997.                   MUIA_TextEditor_Slider, slider,
  998.                End,
  999.                Child, slider,
  1000.             End,
  1001.             Child, ColGroup(2),
  1002.                Child, data->GUI.BT_INSTAG = MakeButton(GetStr(MSG_CO_InsertTag)),
  1003.                Child, data->GUI.BT_INSENV = MakeButton(GetStr(MSG_CO_InsertENV)),
  1004.             End,
  1005.          End,
  1006.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_Taglines)),
  1007.             Child, ColGroup(2),
  1008.                Child, Label2(GetStr(MSG_CO_TaglineFile)),
  1009.                Child, PopaslObject,
  1010.                   MUIA_Popasl_Type     ,ASL_FileRequest,
  1011.                   MUIA_Popstring_String,data->GUI.ST_TAGFILE = MakeString(SIZE_PATHFILE,GetStr(MSG_CO_TaglineFile)),
  1012.                   MUIA_Popstring_Button,PopButton(MUII_PopFile),
  1013.                End,
  1014.                Child, Label2(GetStr(MSG_CO_TaglineSep)),
  1015.                Child, data->GUI.ST_TAGSEP = MakeString(SIZE_SMALL,GetStr(MSG_CO_TaglineSep)),
  1016.             End,
  1017.          End,
  1018.      End)
  1019.    {
  1020.       SetHelp(data->GUI.CY_SIGNAT    ,MSG_HELP_CO_CY_SIGNAT   );
  1021.       SetHelp(data->GUI.BT_SIGEDIT   ,MSG_HELP_CO_BT_EDITSIG  );
  1022.       SetHelp(data->GUI.BT_INSTAG    ,MSG_HELP_CO_BT_INSTAG   );
  1023.       SetHelp(data->GUI.BT_INSENV    ,MSG_HELP_CO_BT_INSENV   );
  1024.       SetHelp(data->GUI.ST_TAGFILE   ,MSG_HELP_CO_ST_TAGFILE  );
  1025.       SetHelp(data->GUI.ST_TAGSEP    ,MSG_HELP_CO_ST_TAGSEP   );
  1026.       DoMethod(data->GUI.BT_INSTAG   ,MUIM_Notify,MUIA_Pressed     ,FALSE         ,data->GUI.TE_SIGEDIT   ,2,MUIM_TextEditor_InsertText,"%t\n");
  1027.       DoMethod(data->GUI.BT_INSENV   ,MUIM_Notify,MUIA_Pressed     ,FALSE         ,data->GUI.TE_SIGEDIT   ,2,MUIM_TextEditor_InsertText,"%e");
  1028.       DoMethod(data->GUI.CY_SIGNAT   ,MUIM_Notify,MUIA_Cycle_Active,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook,&CO_EditSignatHook,FALSE);
  1029.       DoMethod(data->GUI.BT_SIGEDIT  ,MUIM_Notify,MUIA_Pressed     ,FALSE         ,MUIV_Notify_Application,3,MUIM_CallHook,&CO_EditSignatHook,TRUE);
  1030.    }
  1031.    return grp;
  1032. }
  1033.  
  1034. ///
  1035. /// CO_Page8  (Lists)
  1036. APTR CO_Page8(struct CO_ClassData *data)
  1037. {
  1038.    APTR grp;
  1039.    if (grp = VGroup,
  1040.          MUIA_HelpNode, "CO08",
  1041.          Child, HGroup,
  1042.             Child, ColGroup(2), GroupFrameT(GetStr(MSG_FolderList)),
  1043.                MUIA_ShortHelp, GetStr(MSG_HELP_CO_CG_FO),
  1044.                Child, MakeStaticCheck(),
  1045.                Child, LLabel(GetStr(MSG_Folder)),
  1046.                Child, data->GUI.CH_FCOLS[1] = MakeCheck(""),
  1047.                Child, LLabel(GetStr(MSG_Total)),
  1048.                Child, data->GUI.CH_FCOLS[2] = MakeCheck(""),
  1049.                Child, LLabel(GetStr(MSG_Unread)),
  1050.                Child, data->GUI.CH_FCOLS[3] = MakeCheck(""),
  1051.                Child, LLabel(GetStr(MSG_New)),
  1052.                Child, data->GUI.CH_FCOLS[4] = MakeCheck(""),
  1053.                Child, LLabel(GetStr(MSG_Size)),
  1054.             End,
  1055.             Child, HSpace(0),
  1056.             Child, ColGroup(2), GroupFrameT(GetStr(MSG_MessageList)),
  1057.                MUIA_ShortHelp, GetStr(MSG_HELP_CO_CG_MA),
  1058.                Child, MakeStaticCheck(),
  1059.                Child, LLabel(GetStr(MSG_Status)),
  1060.                Child, data->GUI.CH_MCOLS[1] = MakeCheck(""),
  1061.                Child, LLabel(GetStr(MSG_SenderRecpt)),
  1062.                Child, data->GUI.CH_MCOLS[2] = MakeCheck(""),
  1063.                Child, LLabel(GetStr(MSG_ReturnAddress)),
  1064.                Child, data->GUI.CH_MCOLS[3] = MakeCheck(""),
  1065.                Child, LLabel(GetStr(MSG_Subject)),
  1066.                Child, data->GUI.CH_MCOLS[4] = MakeCheck(""),
  1067.                Child, LLabel(GetStr(MSG_MessageDate)),
  1068.                Child, data->GUI.CH_MCOLS[5] = MakeCheck(""),
  1069.                Child, LLabel(GetStr(MSG_Size)),
  1070.                Child, data->GUI.CH_MCOLS[6] = MakeCheck(""),
  1071.                Child, LLabel(GetStr(MSG_Filename)),
  1072.             End,
  1073.          End,
  1074.          Child, MakeCheckGroup((Object **)&data->GUI.CH_FIXFLIST, GetStr(MSG_CO_FixedFontList)),
  1075.          Child, MakeCheckGroup((Object **)&data->GUI.CH_BEAT, GetStr(MSG_CO_SwatchBeat)),
  1076.          Child, HVSpace,
  1077.       End)
  1078.    {
  1079.       SetHelp(data->GUI.CH_FIXFLIST,MSG_HELP_CO_CH_FIXFLIST);
  1080.       SetHelp(data->GUI.CH_BEAT    ,MSG_HELP_CO_CH_BEAT);
  1081.    }
  1082.    return grp;
  1083. }
  1084.  
  1085. ///
  1086. /// CO_Page9  (Security)
  1087. APTR CO_Page9(struct CO_ClassData *data)
  1088. {
  1089.    APTR grp;
  1090.    static char *logfmode[4];
  1091.    logfmode[0] = GetStr(MSG_CO_LogNone);
  1092.    logfmode[1] = GetStr(MSG_CO_LogNormal);
  1093.    logfmode[2] = GetStr(MSG_CO_LogVerbose);
  1094.    logfmode[3] = NULL;
  1095.    if (grp = VGroup,
  1096.          MUIA_HelpNode, "CO09",
  1097.          Child, HVSpace,
  1098.          Child, ColGroup(2), GroupFrameT("PGP"),
  1099.             Child, Label2(GetStr(MSG_CO_PGPExe)),
  1100.             Child, PopaslObject,
  1101.                MUIA_Popasl_Type     ,ASL_FileRequest,
  1102.                MUIA_Popstring_String,data->GUI.ST_PGPCMD= MakeString(SIZE_PATHFILE,GetStr(MSG_CO_PGPExe)),
  1103.                MUIA_Popstring_Button,PopButton(MUII_PopDrawer),
  1104.                ASLFR_DrawersOnly, TRUE,
  1105.             End,
  1106.             Child, Label2(GetStr(MSG_CO_PGPKey)),
  1107.             Child, HGroup,
  1108.                Child, MakePGPKeyList(&(data->GUI.ST_MYPGPID), TRUE, GetStr(MSG_CO_PGPKey)),
  1109.                Child, HSpace(8),
  1110.                Child, data->GUI.CH_ENCSELF = MakeCheck(GetStr(MSG_CO_EncryptToSelf)),
  1111.                Child, Label1(GetStr(MSG_CO_EncryptToSelf)),
  1112.             End,
  1113.          End,
  1114.          Child, ColGroup(2), GroupFrameT(GetStr(MSG_CO_AnonMail)),
  1115.             Child, Label2(GetStr(MSG_CO_ReMailer)),
  1116.             Child, data->GUI.ST_REMAILER = MakeString(SIZE_ADDRESS,GetStr(MSG_CO_ReMailer)),
  1117.             Child, Label2(GetStr(MSG_CO_ReMailerLine)),
  1118.             Child, data->GUI.ST_FIRSTLINE = MakeString(SIZE_INTRO,GetStr(MSG_CO_ReMailerLine)),
  1119.          End,
  1120.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_Logfiles)),
  1121.             Child, HGroup,
  1122.                Child, Label2(GetStr(MSG_CO_LogPath)),
  1123.                Child, PopaslObject,
  1124.                   MUIA_Popasl_Type     ,ASL_FileRequest,
  1125.                   MUIA_Popstring_String,data->GUI.ST_LOGFILE = MakeString(SIZE_PATH,GetStr(MSG_CO_LogPath)),
  1126.                   MUIA_Popstring_Button,PopButton(MUII_PopDrawer),
  1127.                   ASLFR_DrawersOnly, TRUE,
  1128.                End,
  1129.             End,
  1130.             Child, ColGroup(5),
  1131.                Child, data->GUI.CH_SPLITLOG = MakeCheck(GetStr(MSG_CO_LogSplit)),
  1132.                Child, LLabel1(GetStr(MSG_CO_LogSplit)),
  1133.                Child, HSpace(0),
  1134.                Child, Label1(GetStr(MSG_CO_LogMode)),
  1135.                Child, data->GUI.CY_LOGMODE = MakeCycle(logfmode,GetStr(MSG_CO_LogMode)),
  1136.                Child, data->GUI.CH_LOGALL = MakeCheck(GetStr(MSG_CO_LogAllEvents)),
  1137.                Child, LLabel1(GetStr(MSG_CO_LogAllEvents)),
  1138.                Child, HSpace(0),
  1139.                Child, HSpace(0),
  1140.                Child, HSpace(0),
  1141.             End,
  1142.          End,
  1143.          Child, HVSpace,
  1144.       End)
  1145.    {
  1146.       SetHelp(data->GUI.ST_PGPCMD    ,MSG_HELP_CO_ST_PGPCMD   );
  1147.       SetHelp(data->GUI.ST_MYPGPID   ,MSG_HELP_CO_ST_MYPGPID  );
  1148.       SetHelp(data->GUI.CH_ENCSELF   ,MSG_HELP_CO_CH_ENCSELF  );
  1149.       SetHelp(data->GUI.ST_REMAILER  ,MSG_HELP_CO_ST_REMAILER );
  1150.       SetHelp(data->GUI.ST_FIRSTLINE ,MSG_HELP_CO_ST_FIRSTLINE);
  1151.       SetHelp(data->GUI.ST_LOGFILE   ,MSG_HELP_CO_ST_LOGFILE  );
  1152.       SetHelp(data->GUI.CH_SPLITLOG  ,MSG_HELP_CO_CH_SPLITLOG );
  1153.       SetHelp(data->GUI.CY_LOGMODE   ,MSG_HELP_CO_CY_LOGMODE  );
  1154.       SetHelp(data->GUI.CH_LOGALL    ,MSG_HELP_CO_CH_LOGALL   );
  1155.    }
  1156.    return grp;
  1157. }
  1158.  
  1159. ///
  1160. /// CO_Page10 (Start/Quit)
  1161. APTR CO_Page10(struct CO_ClassData *data)
  1162. {
  1163.    APTR grp;
  1164.    if (grp = VGroup,
  1165.          MUIA_HelpNode, "CO10",
  1166.          Child, HVSpace,
  1167.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_OnStartup)),
  1168.             Child, MakeCheckGroup((Object **)&data->GUI.CH_LOADALL, GetStr(MSG_CO_LoadAll)),
  1169.             Child, MakeCheckGroup((Object **)&data->GUI.CH_MARKNEW, GetStr(MSG_CO_MarkNew)),
  1170.             Child, MakeCheckGroup((Object **)&data->GUI.CH_DELETESTART, GetStr(MSG_CO_DeleteOld)),
  1171.             Child, MakeCheckGroup((Object **)&data->GUI.CH_REMOVESTART, GetStr(MSG_CO_RemoveDel)),
  1172.             Child, MakeCheckGroup((Object **)&data->GUI.CH_CHECKBD, GetStr(MSG_CO_CheckDOB)),
  1173.             Child, MakeCheckGroup((Object **)&data->GUI.CH_SENDSTART, GetStr(MSG_CO_SendStart)),
  1174.             Child, MakeCheckGroup((Object **)&data->GUI.CH_POPSTART, GetStr(MSG_CO_PopStart)),
  1175.          End,
  1176.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_OnTermination)),
  1177.             Child, MakeCheckGroup((Object **)&data->GUI.CH_SENDQUIT, GetStr(MSG_CO_SendStart)),
  1178.             Child, MakeCheckGroup((Object **)&data->GUI.CH_DELETEQUIT, GetStr(MSG_CO_DeleteOld)),
  1179.             Child, MakeCheckGroup((Object **)&data->GUI.CH_REMOVEQUIT, GetStr(MSG_CO_RemoveDel)),
  1180.          End,
  1181.          Child, HVSpace,
  1182.       End)
  1183.    {
  1184.       SetHelp(data->GUI.CH_LOADALL    ,MSG_HELP_CO_CH_LOADALL   );
  1185.       SetHelp(data->GUI.CH_MARKNEW    ,MSG_HELP_CO_CH_MARKNEW   );
  1186.       SetHelp(data->GUI.CH_DELETESTART,MSG_HELP_CO_CH_DELETEOLD );
  1187.       SetHelp(data->GUI.CH_REMOVESTART,MSG_HELP_CO_CH_REMOVEDEL );
  1188.       SetHelp(data->GUI.CH_SENDSTART  ,MSG_HELP_CO_CH_SEND      );
  1189.       SetHelp(data->GUI.CH_POPSTART   ,MSG_HELP_CO_CH_POPSTART  );
  1190.       SetHelp(data->GUI.CH_CHECKBD    ,MSG_HELP_CO_CH_CHECKBD   );
  1191.       SetHelp(data->GUI.CH_SENDQUIT   ,MSG_HELP_CO_CH_SEND      );
  1192.       SetHelp(data->GUI.CH_DELETEQUIT ,MSG_HELP_CO_CH_DELETEOLD );
  1193.       SetHelp(data->GUI.CH_REMOVEQUIT ,MSG_HELP_CO_CH_REMOVEDEL );
  1194.    }
  1195.    return grp;
  1196. }
  1197.  
  1198. ///
  1199. /// CO_Page11 (MIME)
  1200. APTR CO_Page11(struct CO_ClassData *data)
  1201. {
  1202.    APTR grp;
  1203.    if (grp = VGroup,
  1204.          MUIA_HelpNode, "CO11",
  1205.          Child, VGroup, GroupFrameT(GetStr(MSG_CO_MimeViewers)),
  1206.             Child, HGroup,
  1207.                Child, ListviewObject,
  1208.                   MUIA_Weight, 60,
  1209.                   MUIA_CycleChain, 1,
  1210.                   MUIA_Listview_List, data->GUI.LV_MIME = ListObject, InputListFrame, End,
  1211.                End,
  1212.                Child, VGroup,
  1213.                   Child, data->GUI.GR_MIME = ColGroup(2),
  1214.                      Child, Label2(GetStr(MSG_CO_MimeType)),
  1215.                      Child, PoplistObject,
  1216.                         MUIA_Popstring_String, data->GUI.ST_CTYPE = MakeString(SIZE_CTYPE,GetStr(MSG_CO_MimeType)),
  1217.                         MUIA_Popstring_Button, PopButton(MUII_PopUp),
  1218.                         MUIA_Poplist_Array   , ContType,
  1219.                      End,
  1220.                      Child, Label2(GetStr(MSG_CO_Extension)),
  1221.                      Child, data->GUI.ST_EXTENS = MakeString(SIZE_NAME,GetStr(MSG_CO_Extension)),
  1222.                      Child, Label2(GetStr(MSG_CO_MimeCmd)),
  1223.                      Child, PopaslObject,
  1224.                         MUIA_Popstring_String, data->GUI.ST_COMMAND = MakeString(SIZE_COMMAND,GetStr(MSG_CO_MimeCmd)),
  1225.                         MUIA_Popstring_Button, PopButton(MUII_PopFile),
  1226.                      End,
  1227.                   End,
  1228.                   Child, VSpace(0),
  1229.                   Child, ColGroup(2),
  1230.                      Child, data->GUI.BT_MADD = MakeButton(GetStr(MSG_Add)),
  1231.                      Child, data->GUI.BT_MDEL = MakeButton(GetStr(MSG_Del)),
  1232.                   End,
  1233.                End,
  1234.             End,
  1235.             Child, HGroup,
  1236.                Child, Label2(GetStr(MSG_CO_DefaultViewer)),
  1237.                Child, PopaslObject,
  1238.                   MUIA_Popstring_String, data->GUI.ST_DEFVIEWER = MakeString(SIZE_COMMAND,GetStr(MSG_CO_DefaultViewer)),
  1239.                   MUIA_Popstring_Button, PopButton(MUII_PopFile),
  1240.                End,
  1241.             End,
  1242.             Child, MakeCheckGroup((Object **)&data->GUI.CH_IDENTBIN, GetStr(MSG_CO_IdentifyBin)),
  1243.          End,
  1244.          Child, ColGroup(2), GroupFrameT(GetStr(MSG_CO_Paths)),
  1245.             Child, Label2(GetStr(MSG_CO_Detach)),
  1246.             Child, PopaslObject,
  1247.                MUIA_Popasl_Type     ,ASL_FileRequest,
  1248.                MUIA_Popstring_String,data->GUI.ST_DETACHDIR = MakeString(SIZE_PATH,GetStr(MSG_CO_Detach)),
  1249.                MUIA_Popstring_Button,PopButton(MUII_PopDrawer),
  1250.                ASLFR_DrawersOnly, TRUE,
  1251.             End,
  1252.             Child, Label2(GetStr(MSG_CO_Attach)),
  1253.             Child, PopaslObject,
  1254.                MUIA_Popasl_Type     ,ASL_FileRequest,
  1255.                MUIA_Popstring_String,data->GUI.ST_ATTACHDIR = MakeString(SIZE_PATH,GetStr(MSG_CO_Attach)),
  1256.                MUIA_Popstring_Button,PopButton(MUII_PopDrawer),
  1257.                ASLFR_DrawersOnly, TRUE,
  1258.             End,
  1259.          End,
  1260.       End)
  1261.    {
  1262.       SetHelp(data->GUI.ST_CTYPE     ,MSG_HELP_CO_ST_CTYPE     );
  1263.       SetHelp(data->GUI.ST_EXTENS    ,MSG_HELP_CO_ST_EXTENS    );
  1264.       SetHelp(data->GUI.ST_COMMAND   ,MSG_HELP_CO_ST_COMMAND   );
  1265.       SetHelp(data->GUI.BT_MADD      ,MSG_HELP_CO_BT_MADD      );
  1266.       SetHelp(data->GUI.BT_MDEL      ,MSG_HELP_CO_BT_MDEL      );
  1267.       SetHelp(data->GUI.ST_DEFVIEWER ,MSG_HELP_CO_ST_DEFVIEWER );
  1268.       SetHelp(data->GUI.CH_IDENTBIN  ,MSG_HELP_CO_CH_IDENTBIN  );
  1269.       SetHelp(data->GUI.ST_DETACHDIR ,MSG_HELP_CO_ST_DETACHDIR );
  1270.       SetHelp(data->GUI.ST_ATTACHDIR ,MSG_HELP_CO_ST_ATTACHDIR );
  1271.       DoMethod(grp,MUIM_MultiSet,MUIA_Disabled,TRUE,data->GUI.GR_MIME,data->GUI.BT_MDEL,NULL);
  1272.       DoMethod(data->GUI.LV_MIME     ,MUIM_Notify,MUIA_List_Active    ,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_GetMVEntryHook);
  1273.       DoMethod(data->GUI.ST_CTYPE    ,MUIM_Notify,MUIA_String_Contents,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutMVEntryHook);
  1274.       DoMethod(data->GUI.ST_EXTENS   ,MUIM_Notify,MUIA_String_Contents,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutMVEntryHook);
  1275.       DoMethod(data->GUI.ST_COMMAND  ,MUIM_Notify,MUIA_String_Contents,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutMVEntryHook);
  1276.       DoMethod(data->GUI.ST_DEFVIEWER,MUIM_Notify,MUIA_String_Contents,MUIV_EveryTime,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_PutMVEntryHook);
  1277.       DoMethod(data->GUI.BT_MADD     ,MUIM_Notify,MUIA_Pressed        ,FALSE         ,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_AddMimeViewHook);
  1278.       DoMethod(data->GUI.BT_MDEL     ,MUIM_Notify,MUIA_Pressed        ,FALSE         ,MUIV_Notify_Application,2,MUIM_CallHook ,&CO_DelMimeViewHook);
  1279.    }
  1280.    return grp;
  1281. }
  1282.  
  1283. ///
  1284. /// CO_Page12 (Address book)
  1285. APTR CO_Page12(struct CO_ClassData *data)
  1286. {
  1287.    APTR grp;
  1288.    static char *atab[6];
  1289.    atab[0] = GetStr(MSG_CO_ATABnever);
  1290.    atab[1] = GetStr(MSG_CO_ATABinfoask);
  1291.    atab[2] = GetStr(MSG_CO_ATABask);
  1292.    atab[3] = GetStr(MSG_CO_ATABinfo);
  1293.    atab[4] = GetStr(MSG_CO_ATABalways);
  1294.    atab[5] = NULL;
  1295.    if (grp = VGroup,
  1296.          MUIA_HelpNode, "CO12",
  1297.          Child, HGroup, GroupFrameT(GetStr(MSG_Columns)),
  1298.             Child, HVSpace,
  1299.             Child, ColGroup(4),
  1300.                MUIA_ShortHelp, GetStr(MSG_HELP_CO_CG_AB),
  1301.                Child, data->GUI.CH_ACOLS[1] = MakeCheck(""),
  1302.                Child, LLabel(GetStr(MSG_Realname)),
  1303.                Child, data->GUI.CH_ACOLS[2] = MakeCheck(""),
  1304.                Child, LLabel(GetStr(MSG_Description)),
  1305.                Child, data->GUI.CH_ACOLS[3] = MakeCheck(""),
  1306.                Child, LLabel(GetStr(MSG_Email)),
  1307.                Child, data->GUI.CH_ACOLS[4] = MakeCheck(""),
  1308.                Child, LLabel(GetStr(MSG_Street)),
  1309.                Child, data->GUI.CH_ACOLS[5] = MakeCheck(""),
  1310.                Child, LLabel(GetStr(MSG_City)),
  1311.                Child, data->GUI.CH_ACOLS[6] = MakeCheck(""),
  1312.                Child, LLabel(GetStr(MSG_Country)),
  1313.                Child, data->GUI.CH_ACOLS[7] = MakeCheck(""),
  1314.                Child, LLabel(GetStr(MSG_Phone)),
  1315.                Child, data->GUI.CH_ACOLS[8] = MakeCheck(""),
  1316.                Child, LLabel(GetStr(MSG_DOB)),
  1317.             End,
  1318.             Child, HVSpace,
  1319.          End,
  1320.          Child, ColGroup(2), GroupFrameT(GetStr(MSG_CO_InfoExc)),
  1321.             Child, Label1(GetStr(MSG_CO_AddInfo)),
  1322.             Child, HGroup,
  1323.                Child, data->GUI.CH_ADDINFO = MakeCheck(GetStr(MSG_CO_AddInfo)),
  1324.                Child, HSpace(0),
  1325.             End,
  1326.             Child, Label1(GetStr(MSG_CO_AddToAddrbook)),
  1327.             Child, data->GUI.CY_ATAB = MakeCycle(atab, GetStr(MSG_CO_AddToAddrbook)),
  1328.             Child, Label2(GetStr(MSG_CO_Gallery)),
  1329.             Child, PopaslObject,
  1330.                MUIA_Popasl_Type     ,ASL_FileRequest,
  1331.                MUIA_Popstring_String,data->GUI.ST_GALLDIR = MakeString(SIZE_PATH,GetStr(MSG_CO_Gallery)),
  1332.                MUIA_Popstring_Button,PopButton(MUII_PopDrawer),
  1333.                ASLFR_DrawersOnly, TRUE,
  1334.             End,
  1335.             Child, Label2(GetStr(MSG_CO_NewGroup)),
  1336.             Child, data->GUI.ST_NEWGROUP = MakeString(SIZE_NAME,GetStr(MSG_CO_NewGroup)),
  1337.             Child, Label2(GetStr(MSG_CO_MyURL)),
  1338.             Child, data->GUI.ST_PHOTOURL = MakeString(SIZE_URL,GetStr(MSG_CO_MyURL)),
  1339.             Child, Label2(GetStr(MSG_CO_ProxyServer)),
  1340.             Child, data->GUI.ST_PROXY = MakeString(SIZE_HOST,GetStr(MSG_CO_ProxyServer)),
  1341.          End,
  1342.          Child, HVSpace,
  1343.       End)
  1344.    {
  1345.       SetHelp(data->GUI.ST_GALLDIR   ,MSG_HELP_CO_ST_GALLDIR   );
  1346.       SetHelp(data->GUI.ST_PHOTOURL  ,MSG_HELP_CO_ST_PHOTOURL  );
  1347.       SetHelp(data->GUI.ST_PROXY     ,MSG_HELP_CO_ST_PROXY     );
  1348.       SetHelp(data->GUI.ST_NEWGROUP  ,MSG_HELP_CO_ST_NEWGROUP  );
  1349.       SetHelp(data->GUI.CY_ATAB      ,MSG_HELP_CO_CY_ATAB      );
  1350.       SetHelp(data->GUI.CH_ADDINFO   ,MSG_HELP_WR_CH_ADDINFO   );
  1351.    }
  1352.    return grp;
  1353. }
  1354.  
  1355. ///
  1356. /// CO_Page13 (Scripts)
  1357. APTR CO_Page13(struct CO_ClassData *data)
  1358. {
  1359.    APTR grp;
  1360.    static char *stype[3];
  1361.    int i;
  1362.    stype[0] = "ARexx";
  1363.    stype[1] = "AmigaDOS";
  1364.    stype[2] = 0;
  1365.    if (grp = VGroup, GroupFrameT(GetStr(MSG_MA_Scripts)),
  1366.          MUIA_HelpNode, "CO13",
  1367.          Child, data->GUI.LV_REXX = ListviewObject,
  1368.             MUIA_CycleChain, 1,
  1369.             MUIA_Listview_List, ListObject,
  1370.                InputListFrame,
  1371.                MUIA_List_DisplayHook, &CO_LV_RxDspHook,
  1372.             End,
  1373.          End,
  1374.          Child, ColGroup(2),
  1375.             Child, Label2(GetStr(MSG_CO_Name)),
  1376.             Child, HGroup,
  1377.                Child, data->GUI.ST_RXNAME = MakeString(SIZE_NAME,GetStr(MSG_CO_Name)),
  1378.                Child, data->GUI.CY_ISADOS = MakeCycle(stype,""),
  1379.             End,
  1380.             Child, Label2(GetStr(MSG_CO_Script)),
  1381.             Child, PopaslObject,
  1382.                MUIA_Popasl_Type     ,ASL_FileRequest,
  1383.                MUIA_Popstring_String,data->GUI.ST_SCRIPT = MakeString(SIZE_PATHFILE,GetStr(MSG_CO_Script)),
  1384.                MUIA_Popstring_Button,PopButton(MUII_PopFile),
  1385.             End,
  1386.          End,
  1387.          Child, HGroup,
  1388.             Child, MakeCheckGroup((Object **)&data->GUI.CH_CONSOLE, GetStr(MSG_CO_OpenConsole)),
  1389.             Child, MakeCheckGroup((Object **)&data->GUI.CH_WAITTERM, GetStr(MSG_CO_WaitTerm)),
  1390.          End,
  1391.       End)
  1392.    {
  1393.       for (i = 1; i <= MAXRX; i++) DoMethod(data->GUI.LV_REXX, MUIM_List_InsertSingle, i, MUIV_List_Insert_Bottom);
  1394.       SetHelp(data->GUI.ST_RXNAME    ,MSG_HELP_CO_ST_RXNAME    );
  1395.       SetHelp(data->GUI.ST_SCRIPT    ,MSG_HELP_CO_ST_SCRIPT    );
  1396.       SetHelp(data->GUI.CY_ISADOS    ,MSG_HELP_CO_CY_ISADOS    );
  1397.       SetHelp(data->GUI.CH_CONSOLE   ,MSG_HELP_CO_CH_CONSOLE   );
  1398.       SetHelp(data->GUI.CH_WAITTERM  ,MSG_HELP_CO_CH_WAITTERM  );
  1399.       DoMethod(data->GUI.LV_REXX     ,MUIM_Notify,MUIA_List_Active    ,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook,&CO_GetRXEntryHook,0);
  1400.       DoMethod(data->GUI.ST_RXNAME   ,MUIM_Notify,MUIA_String_Contents,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook,&CO_PutRXEntryHook,0);
  1401.       DoMethod(data->GUI.ST_SCRIPT   ,MUIM_Notify,MUIA_String_Contents,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook,&CO_PutRXEntryHook,0);
  1402.       DoMethod(data->GUI.CY_ISADOS   ,MUIM_Notify,MUIA_Cycle_Active   ,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook,&CO_PutRXEntryHook,0);
  1403.       DoMethod(data->GUI.CH_CONSOLE  ,MUIM_Notify,MUIA_Selected       ,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook,&CO_PutRXEntryHook,0);
  1404.       DoMethod(data->GUI.CH_WAITTERM ,MUIM_Notify,MUIA_Selected       ,MUIV_EveryTime,MUIV_Notify_Application,3,MUIM_CallHook,&CO_PutRXEntryHook,0);
  1405.    }
  1406.    return grp;
  1407. }
  1408.  
  1409. ///
  1410. /// CO_Page14 (Mixed)
  1411. APTR CO_Page14(struct CO_ClassData *data)
  1412. {
  1413.    APTR grp;
  1414.    static char *dispnot[5], *empty[5];
  1415.    dispnot[0] = GetStr(MSG_CO_DispIgnore);
  1416.    dispnot[1] = GetStr(MSG_CO_DispDeny);
  1417.    dispnot[2] = GetStr(MSG_CO_DispAsk);
  1418.    dispnot[3] = GetStr(MSG_CO_DispAccept);
  1419.    dispnot[4] = NULL;
  1420.    empty[0] = empty[1] = empty[2] = empty[3] = "";
  1421.    empty[4] = NULL;
  1422.    if (grp = ScrollgroupObject,
  1423.          MUIA_HelpNode, "CO14",
  1424.          MUIA_Scrollgroup_FreeHoriz, FALSE,
  1425.          MUIA_Scrollgroup_Contents, VGroupV,
  1426.             Child, ColGroup(2), GroupFrameT(GetStr(MSG_CO_Paths)),
  1427.                Child, Label2(GetStr(MSG_CO_TempDir)),
  1428.                Child, PopaslObject,
  1429.                   MUIA_Popasl_Type     ,ASL_FileRequest,
  1430.                   MUIA_Popstring_String,data->GUI.ST_TEMPDIR = MakeString(SIZE_PATH,GetStr(MSG_CO_TempDir)),
  1431.                   MUIA_Popstring_Button,PopButton(MUII_PopDrawer),
  1432.                   ASLFR_DrawersOnly, TRUE,
  1433.                End,
  1434.             End,
  1435.             Child, VGroup, GroupFrameT(GetStr(MSG_CO_AppIcon)),
  1436.                Child, HGroup,
  1437.                   Child, Label2(GetStr(MSG_CO_PositionX)),
  1438.                   Child, data->GUI.ST_APPX = MakeInteger(5,"_X"),
  1439.                   Child, Label2("_Y"),
  1440.                   Child, data->GUI.ST_APPY = MakeInteger(5,"_Y"),
  1441.                End,
  1442.                Child, MakeCheckGroup((Object **)&data->GUI.CH_CLGADGET, GetStr(MSG_CO_CloseGadget)),
  1443.             End,
  1444.             Child, VGroup, GroupFrameT(GetStr(MSG_CO_SaveDelete)),
  1445.                Child, HGroup,
  1446.                   Child, data->GUI.CH_CONFIRM = MakeCheck(GetStr(MSG_CO_ConfirmDelPart1)),
  1447.                   Child, Label2(GetStr(MSG_CO_ConfirmDelPart1)),
  1448.                   Child, data->GUI.NB_CONFIRMDEL = MakeNumeric(1,50,FALSE),
  1449.                   Child, Label2(GetStr(MSG_CO_ConfirmDelPart2)),
  1450.                   Child, HSpace(0),
  1451.                End,
  1452.                Child, MakeCheckGroup((Object **)&data->GUI.CH_REMOVE, GetStr(MSG_CO_Remove)),
  1453.                Child, MakeCheckGroup((Object **)&data->GUI.CH_SAVESENT, GetStr(MSG_CO_SaveSent)),
  1454.             End,
  1455.            Child, VGroup, GroupFrameT(GetStr(MSG_CO_MDN)),
  1456.                Child, ColGroup(5),
  1457.                   Child, LLabel(GetStr(MSG_Display)),
  1458.                   Child, LLabel(GetStr(MSG_Process)),
  1459.                   Child, LLabel(GetStr(MSG_CO_Del)),
  1460.                   Child, LLabel(GetStr(MSG_Filter)),
  1461.                   Child, HSpace(0),
  1462.                   Child, data->GUI.RA_MDN_DISP = RadioObject, MUIA_Radio_Entries, empty, MUIA_CycleChain, TRUE, End,
  1463.                   Child, data->GUI.RA_MDN_PROC = RadioObject, MUIA_Radio_Entries, empty, MUIA_CycleChain, TRUE, End,
  1464.                   Child, data->GUI.RA_MDN_DELE = RadioObject, MUIA_Radio_Entries, empty, MUIA_CycleChain, TRUE, End,
  1465.                   Child, data->GUI.RA_MDN_RULE = RadioObject, MUIA_Radio_Entries, dispnot, MUIA_CycleChain, TRUE, End,
  1466.                   Child, HSpace(0),
  1467.                End,
  1468.                Child, MakeCheckGroup((Object **)&data->GUI.CH_SEND_MDN, GetStr(MSG_CO_SendAtOnce)),
  1469.             End,
  1470.             Child, HGroup, GroupFrameT(GetStr(MSG_CO_XPK)),
  1471.                Child, ColGroup(5),
  1472.                   Child, Label1(GetStr(MSG_CO_XPKPack)),
  1473.                   Child, MakeXPKPop(&data->GUI.TX_PACKER, TRUE, FALSE),
  1474.                   Child, data->GUI.NB_PACKER = MakeNumeric(0,100,TRUE),
  1475.                   Child, HSpace(8),
  1476.                   Child, HGroup,
  1477.                      Child, LLabel(GetStr(MSG_CO_Archiver)),
  1478.                      Child, HSpace(0),
  1479.                   End,
  1480.                   Child, Label1(GetStr(MSG_CO_XPKPackEnc)),
  1481.                   Child, MakeXPKPop(&data->GUI.TX_ENCPACK, TRUE, TRUE),
  1482.                   Child, data->GUI.NB_ENCPACK = MakeNumeric(0,100,TRUE),
  1483.                   Child, HSpace(8),
  1484.                   Child, MakeVarPop(&data->GUI.ST_ARCHIVER, 3, SIZE_COMMAND, GetStr(MSG_CO_Archiver)),
  1485.                End,
  1486.             End,
  1487.             Child, HVSpace,
  1488.          End,
  1489.       End)
  1490.    {
  1491.       SetHelp(data->GUI.ST_TEMPDIR   ,MSG_HELP_CO_ST_TEMPDIR   );
  1492.       SetHelp(data->GUI.ST_APPX      ,MSG_HELP_CO_ST_APP       );
  1493.       SetHelp(data->GUI.ST_APPY      ,MSG_HELP_CO_ST_APP       );
  1494.       SetHelp(data->GUI.CH_CLGADGET  ,MSG_HELP_CO_CH_CLGADGET  );
  1495.       SetHelp(data->GUI.CH_CONFIRM   ,MSG_HELP_CO_CH_CONFIRM   );
  1496.       SetHelp(data->GUI.NB_CONFIRMDEL,MSG_HELP_CO_NB_CONFIRMDEL);
  1497.       SetHelp(data->GUI.CH_REMOVE    ,MSG_HELP_CO_CH_REMOVE    );
  1498.       SetHelp(data->GUI.CH_SAVESENT  ,MSG_HELP_CO_CH_SAVESENT  );
  1499.       SetHelp(data->GUI.RA_MDN_DISP  ,MSG_HELP_CO_RA_MDN_DISP  );
  1500.       SetHelp(data->GUI.RA_MDN_PROC  ,MSG_HELP_CO_RA_MDN_PROC  );
  1501.       SetHelp(data->GUI.RA_MDN_DELE  ,MSG_HELP_CO_RA_MDN_DELE  );
  1502.       SetHelp(data->GUI.RA_MDN_RULE  ,MSG_HELP_CO_RA_MDN_RULE  );
  1503.       SetHelp(data->GUI.CH_SEND_MDN  ,MSG_HELP_CO_CH_SEND_MDN  );
  1504.       SetHelp(data->GUI.TX_ENCPACK   ,MSG_HELP_CO_TX_ENCPACK   );
  1505.       SetHelp(data->GUI.TX_PACKER    ,MSG_HELP_CO_TX_PACKER    );
  1506.       SetHelp(data->GUI.NB_ENCPACK   ,MSG_HELP_CO_NB_ENCPACK   );
  1507.       SetHelp(data->GUI.NB_PACKER    ,MSG_HELP_CO_NB_ENCPACK   );
  1508.       SetHelp(data->GUI.ST_ARCHIVER  ,MSG_HELP_CO_ST_ARCHIVER  );
  1509.    }
  1510.    return grp;
  1511. }
  1512. ///
  1513.  
  1514.